View Decorator.py
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 Filters(object): | |
def __init__(self, types=[], query=None): | |
self.types = types | |
self.query = query | |
def __call__(self, *args, **kwargs): | |
for type in self.types: | |
try: | |
func = getattr(Filters, type) | |
except AttributeError: |
View services.yml
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
#Services | |
job.company_bundle.quickbooks.parser.company_to_customer: | |
class: David\Job\CompanyBundle\Quickbooks\Parser\CompanyToCustomerParser | |
arguments: [ "@doctrine.orm.entity_manager", "@templating" ] | |
job.company_bundle.quickbooks.parser.estimate_to_job: | |
class: David\Job\CompanyBundle\Quickbooks\Parser\EstimateToJobParser | |
arguments: [ "@doctrine.orm.entity_manager", "@templating", "@job.company_bundle.quickbooks.parser.company_to_customer" ] |
View GetOneBy.php
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 | |
public function findFirstCompany() | |
{ | |
$query = $this->getEntityManager()->createQueryBuilder(); | |
$query->select('c') | |
->from('CompanyBundle:Company', 'c') | |
->orderBy('c.createdAt', 'DESC'); |
View Example.php
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 Test\Job\CompanyBundle\Entity\Listener; | |
use Test\CoreBundle\Entity\Address; | |
use Doctrine\ORM\Event\LifecycleEventArgs; | |
use Symfony\Component\DependencyInjection\ContainerInterface; |
View ParserFactory.php
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 | |
class JobToEstimateParser | |
{ | |
/** @var JobRepository $jobRepository */ | |
private $jobRepository; | |
/** @var CompanyRepository $companyRepository */ | |
private $companyRepository; |
View CreateHandler.php
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 FA\Shared\CoreBundle\Handler; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use FA\Shared\CoreBundle\Form\Handler\FormHandler; | |
class CreateHandler extends NewHandler | |
{ |
View FormHandler.php
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 FA\Shared\CoreBundle\Form\Handler; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormFactory; | |
class FormHandler |
View formTest.php
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 | |
protected function setUp() | |
{ | |
$this->factory = Forms::createFormFactoryBuilder() | |
->addExtensions($this->getExtensions()) | |
->addTypeExtension(new AutoCompleteExtension()) | |
->getFormFactory(); | |
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); |
View User.php
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 | |
/** | |
* @return string | |
* @VirtualProperty | |
* @SerializedName("foo") | |
*/ | |
public function getFoo() | |
{ | |
if ($this->getEmailMask()) |
View example.php
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 | |
class Contact { | |
protected $maskEmail; | |
protected $email; | |
public function checkEmail() | |
{ | |
if ($this->maskEmail){ |