This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User extends Doctrine_Record | |
{ | |
protected $username; | |
public function setName($name) | |
{ | |
$this->username = $name; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models.py | |
class Item(models.Model): | |
name = models.CharField(max_length=60) | |
created = models.DateTimeField(auto_now_add=True) | |
priority = models.IntegerField(default=0) | |
difficulty = models.IntegerField(default=0) | |
done = models.BooleanField(default=False) | |
class ItemAdmin(admin.ModelAdmin): | |
list_display = ["name", "priority", "difficulty", "created", "done"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sfapp% php app/console doctrine:data:load | |
PHP Fatal error: Class 'Doctrine\Common\DataFixtures\Loader' not found in /Users/clement/Sites/sfapp/src/vendor/symfony/src/Symfony/Bundle/DoctrineBundle/Command/LoadDataFixturesDoctrineCommand.php on line 82 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\YourBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpKernel\Exception\FlattenException; | |
use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; | |
class ExceptionController extends Controller | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\DoctrineUserBundle\Entity; | |
use Bundle\DoctrineUserBundle\Entity\User as BaseUser; | |
/** | |
* @orm:Entity(repositoryClass="Application\DoctrineUserBundle\Entity\UserRepository") | |
* @orm:HasLifecycleCallbacks | |
*/ | |
class User extends BaseUser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* I have to table, one user table and one company table. | |
An user belongs to a company (and a company has many users) . | |
In the user form, i have the embed form for company. | |
*/ | |
class myGuardRegisterForm extends BasesfGuardRegisterForm | |
{ | |
/** | |
* @see sfForm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set $1 | |
* @return null | |
*/ | |
public function set${1/./\u$0/}(\$$1) | |
{ | |
\$this->${1/./\l$0/} = \$${1/./\l$0/}; | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\MyBundle\Document; | |
use Application\FOS\UserBundle\Model\User; | |
/** | |
* @mongodb:Document( | |
* collection="company", | |
* repositoryClass="Application\MyBundle\Document\CompanyRepository" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty=format:%aN | sort | uniq -c | sort -rn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried to run : | |
php app/console doctrine:database:drop | |
But i get this error: | |
[InvalidArgumentException] | |
Could not find any configured connections | |
Here is my configuration( DBAL ) |
OlderNewer