Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3212350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:49:46+00:00 2026-05-17T14:49:46+00:00

I am using Doctrine 1.2 & ZF 1.10. I have my Doctrine CLI setup

  • 0

I am using Doctrine 1.2 & ZF 1.10. I have my Doctrine CLI setup fine to do the default tasks. But I have created a couple classes I would like to be able to execute from the command line. How would I setup my application.ini or doctrine.php to register and use these new classes? For instance, I want to be able to execute APPLICATION_PATH . “/job/Migrate.php”, which is just a class Migrate(), that has one public method run(), with something like

php.exe doctrine custom-migrate

Snippet of my application.ini

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../lib"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/modules/default/controllers"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
autoloaderNamespaces[] = "Doctrine"

; ---
; Database
; ---

doctrine.dsn = "mysql://user@pwd@localhost/db_name"
doctrine.data_fixtures_path = APPLICATION_PATH "/configs/data/fixtures"
doctrine.sql_path           = APPLICATION_PATH "/configs/data/sql"
doctrine.migrations_path    = APPLICATION_PATH "/configs/migrations"
doctrine.yaml_schema_path   = APPLICATION_PATH "/configs/schema.yml"
doctrine.models_path        = APPLICATION_PATH "/models" 

doctrine.generate_models_options.pearStyle = true
doctrine.generate_models_options.generateTableClasses = false
doctrine.generate_models_options.generateBaseClasses = true
doctrine.generate_models_options.baseClassPrefix = "Base_"
doctrine.generate_models_options.baseClassesDirectory = 
doctrine.generate_models_options.classPrefixFiles = false
doctrine.generate_models_options.classPrefix = "Model_"

Snippet of my doctrine.php

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV, 
    APPLICATION_PATH . '/configs/application.ini'
);
$application->getBootstrap()->bootstrap('doctrine');
$config = $application->getOption('doctrine');  
$cli = new Doctrine_Cli($config);
$cli->run($_SERVER['argv']);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T14:49:46+00:00Added an answer on May 17, 2026 at 2:49 pm

    I’m afraid this is not possible via options of application.ini. The simplest solution here is to extend Doctrine_Cli which does the CLI job.

    The simplest, doesn’t mean the best.

    Have you looked at beberlei’s zf-doctrine at master – GitHub?

    You may create custom Zend Tool provider then.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Doctrine in symfony 1.4 I have several boolean columns defined (stored as a
N00b question: I'm using Symfony with Doctrine. I have a form where I've added
i am using MySQL with PHP & Doctrine 2. my question is assuming i
Using Doctrine PHP If I have a user with a many to many relationship
im using doctrine-project and i have 3 tables table 1: post -------------- postid ,
I am using Doctrine::generateModelsFromYaml(). It creates a directory filled with base classes. Cool. I'm
I'm using Doctrine 1.1.5 and I'd like to know if there is some option
I'm using Doctrine 1.2 as my ORM for a Zend Framework Project. I have
Does anyone have experience using Doctrine with large datasets? I have an import script
I'm using Doctrine for the ORM of my application. In a table I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.