Bazo blog

Automatic database generation with Doctrine 2

By bazo On 03.10.2011 · Leave a Comment

public function installDatabase()
    {
    $schemaTool =  new \Doctrine\ORM\Tools\SchemaTool($this->entityManager);
        $entityClasses = $this->getEntities();
        $classes = array();
        foreach($entityClasses as $entityClass)
        {
            $classes[] = $this->entityManager->getClassMetadata($entityClass);
        }
    $schemaTool->dropDatabase();
    $schemaTool->createSchema($classes);
        $this->activateTatami();
        $this->installUserRoles();
    return $this;
    }

Continue Reading →

YQL PHP Library released

By bazo On 26.09.2011 · Leave a Comment

Today i have released a PHP library for convenient executions of Yahoo Query Language queries. It prepares cURL requests for querying and formats the response back from JSON strings into native PHP constructs.

How do you use it?

Requirements

YQL PHP Library requires PHP 5.3.

Installation

Just copy the files into your lib folder [...]

Continue Reading →
  • Tvorba webových stránok a administrácií
  • Recent Posts

    • Automatic database generation with Doctrine 2
    • YQL PHP Library released
"Error: Please make sure the Twitter account is public." — bazinder

Bazo blog

Pages

The Latest

  • Automatic database generation with Doctrine 2
    public function installDatabase()    {    $schemaTool =  new \Doctrine\ORM\Tools\SchemaTool($this->entityManager);        $entityClasses = $this->getEntities();        $classes […]

More

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed.
© 2011 Bazo blog
Platform by PageLines