This file contains hidden or 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: |
This file contains hidden or 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" ] |
This file contains hidden or 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'); |
This file contains hidden or 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; |
This file contains hidden or 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; |
This file contains hidden or 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 | |
{ |
This file contains hidden or 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 |
This file contains hidden or 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'); |
This file contains hidden or 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()) |
This file contains hidden or 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){ |