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

  • SEARCH
  • Home
  • 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 1102797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:14:29+00:00 2026-05-17T01:14:29+00:00

I’ve started reading on zend framework and it’s use with Doctrine and have implemented

  • 0

I’ve started reading on zend framework and it’s use with Doctrine and have implemented a small project to grasp the understanding.I’ve come to a point where i needed my model generated as in having a generate script like the one suggested in Doctrine 1.2.2 pdf manual.After few unsuccessful attempts like

Class ‘sfYaml’ not found in
G:\php_document\zendworkspace\BookingManager\library\doctrine\Doctrine\Parser\Yml.php
on line 80

i’ve googled and found out what people are doing about that.
To me it sounds too much the fact of having a command line script to do that work.So my question is do i really need the command line or i fail to load something is my application.ini file to get the error up there?
my testerController is like this:

class Testing_TesterController extends Zend_Controller_Action {

public function init(){
    $optionDoctrine = Zend_Registry::get("config")->toArray();
    $this->config = $optionDoctrine["doctrine"];
}


public function generateAction() {
    $this->view->drop="dropping database............";
    Doctrine_Core::dropDatabases();
    $this->view->create = "creating database........";
    Doctrine_Core::createDatabases();
    $this->view->models = "generating models....";
    //things started breadking from this line  Doctrine_Core::generateModelsFromYaml("$this->config[yaml_schema_path]","$this->config[models_path]");
//      $this->view->tables = "creating tables.......";
//          Doctrine_Core::createTablesFromModels($this->config["models_path"]);        
//      $this->view->success = "tables and model successfully generated";
//      $optionobject= Zend_Registry::get("config")->toArray();
//      $this->view->generate =$optionobject["doctrine"]["yaml_schema_path"];

}

 public function testAction(){

$dbs= Doctrine_Manager::connection()->import->listDatabases();
 $this->view->test = $dbs;
     //$this->view->test = "test";
 }
}

the generate view is like this

<h1>My Manager:: generate page</h1><br>
<div style="text-align: left"><?php echo $this->drop; ?></div>
<div style="text-align: left"><?php echo $this->create; ?></div>
<div style="text-align: left"><?php var_dump($this->models); ?></div>
<div style="text-align: left"><?php echo $this->tables; ?></div>

here is my bootstrap class

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
   protected function _initDoctrine(){
    require_once 'doctrine/Doctrine.php';


      $this->getApplication()->getAutoloader()->pushAutoloader(array('Doctrine','autoload'),"Doctrine");
 //$this->getApplication()->getAutoloader()->pushAutoloader(array('Doctrine','modelsAutoload'),"Doctrine");

    $manager = Doctrine_Manager::getInstance();
 //$manager->setAttribute(Doctrine_Core::ATTR_MODEL_LOADING,Doctrine_Core::MODEL_LOADING_AGGRESSIVE);
    $manager->setAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE,true);

    $doctrineConfig = $this->getOption('doctrine');

    $conn = Doctrine_Manager::connection($doctrineConfig['dsn'],'doctrine');

    return $conn;


}

protected function _initDoctrineConfig(){

    $conf = new Zend_Config($this->getOptions(),true);
    Zend_Registry::set('config',$conf);
    return $conf;
}


}

I’ve also adopted the use of modules which seems to complicate my situation so what do you think is the best to go with? thanks for reading

  • 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-17T01:14:30+00:00Added an answer on May 17, 2026 at 1:14 am

    You need to grab the sfYaml component and install it. I Thought it was int the Doctrine svn repo as an svn:external but maybe not… you can get it from the Symfony components site.

    Im not sure what tutorial youre following but if you drop:

    http://svn.symfony-project.com/components/yaml/branches/1.0/

    into your library folder as sfYaml and add library/sfYaml to the include path you should be fine assuming youve gotten everything else set up correctly.

    Also whay is your command line script using Zend_Controller stuff? Shouldnt you be using the Zend_Tool_Framework infrastructure or writing a completely custom script? Thats how I’ve done it in the past anyway…

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

Sidebar

Related Questions

No related questions found

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.