本文整理汇总了PHP中Zend\Stdlib\Hydrator\ClassMethods::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ClassMethods::__construct方法的具体用法?PHP ClassMethods::__construct怎么用?PHP ClassMethods::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\Stdlib\Hydrator\ClassMethods
的用法示例。
在下文中一共展示了ClassMethods::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($format = 'Y-m-d')
{
parent::__construct();
$dateStrategy = new DateTimeStrategy($format);
$this->addStrategy('birth_date', $dateStrategy);
$this->addStrategy('hire_date', $dateStrategy);
}
示例2: __construct
/**
* @param string $needle What substring identifies the related object
* @param string $setter What function to call to populate the object
* @param mixed $objectPrototype Prototype Object to be used for the Hydration
* @param bool $underscoreSeparatedKeys
*/
public function __construct($needle, $setter, $objectPrototype, $underscoreSeparatedKeys = true)
{
parent::__construct($underscoreSeparatedKeys);
$this->needle = $needle;
$this->setter = $setter;
$this->prototype = $objectPrototype;
}
示例3: __construct
/**
* {@inheritdoc}
*/
public function __construct($underscoreSeparatedKeys = true)
{
parent::__construct($underscoreSeparatedKeys);
// Exclude this methods from the extraction
$this->filterComposite->addFilter('model', new MethodMatchFilter('getModel', true), FilterComposite::CONDITION_AND);
$this->filterComposite->addFilter('hydrator', new MethodMatchFilter('getHydrator', true), FilterComposite::CONDITION_AND);
$this->filterComposite->addFilter('inputFilter', new MethodMatchFilter('getInputFilter', true), FilterComposite::CONDITION_AND);
}
示例4: __construct
public function __construct($underscoreSeparatedKeys = true)
{
parent::__construct();
$this->setUnderscoreSeparatedKeys($underscoreSeparatedKeys);
$this->callableMethodFilter = new OptionalParametersFilter();
$this->filterComposite->addFilter('is', new IsFilter());
$this->filterComposite->addFilter('has', new HasFilter());
$this->filterComposite->addFilter('get', new GetFilter());
$this->filterComposite->addFilter('parameter', new OptionalParametersFilter(), FilterComposite::CONDITION_AND);
}
示例5: __construct
public function __construct()
{
parent::__construct();
$addressStrategy = new AddressStrategy();
$datetimeStrategy = new DateTimeFormatterStrategy(\DateTime::ISO8601);
$this->addStrategy('billing_address', $addressStrategy);
$this->addStrategy('shipping_address', $addressStrategy);
$this->addStrategy('created_time', $datetimeStrategy);
$this->addStrategy('updated_time', $datetimeStrategy);
}
示例6: __construct
public function __construct()
{
parent::__construct();
$datetimeStrategy = new DateTimeFormatterStrategy(\DateTime::ISO8601);
$planStrategy = new PlanStrategy();
$cardStrategy = new CardStrategy();
$customerStrategy = new CustomerStrategy();
$this->addStrategy('created_time', $datetimeStrategy);
$this->addStrategy('updated_time', $datetimeStrategy);
$this->addStrategy('plan', $planStrategy);
$this->addStrategy('card', $cardStrategy);
$this->addStrategy('customer', $customerStrategy);
$this->addStrategy('current_term_starts_at', $datetimeStrategy);
$this->addStrategy('current_term_ends_at', $datetimeStrategy);
}
示例7: __construct
public function __construct()
{
parent::__construct(false);
}
示例8: __construct
public function __construct(UserLogic $userLogic, PasswordHasher $passwordHasher)
{
$this->userLogic = $userLogic;
$this->passwordHasher = $passwordHasher;
parent::__construct(false);
}
示例9: __construct
/**
* @param ZendCryptPassword $cryptoService
* @param bool|array $underscoreSeparatedKeys
*/
public function __construct(ZendCryptPassword $cryptoService, $underscoreSeparatedKeys = true)
{
parent::__construct($underscoreSeparatedKeys);
$this->cryptoService = $cryptoService;
}
示例10: __construct
public function __construct($underscoreSeparatedKeys = false)
{
parent::__construct($underscoreSeparatedKeys);
}
示例11: __construct
/**
* @param HydratorPluginManager $pluginManager
*/
public function __construct(HydratorPluginManager $pluginManager)
{
parent::__construct();
$this->pluginManager = $pluginManager;
}
示例12: __construct
public function __construct(AddressService $addressService)
{
parent::__construct(false);
$this->addressService = $addressService;
}