You are here

public function ClassMethods::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/ClassMethods.php \Zend\Hydrator\ClassMethods::__construct()

Define if extract values will use camel case or name with underscore

Parameters

bool|array $underscoreSeparatedKeys:

Overrides AbstractHydrator::__construct

File

vendor/zendframework/zend-hydrator/src/ClassMethods.php, line 49

Class

ClassMethods

Namespace

Zend\Hydrator

Code

public function __construct($underscoreSeparatedKeys = true) {
  parent::__construct();
  $this
    ->setUnderscoreSeparatedKeys($underscoreSeparatedKeys);
  $this->callableMethodFilter = new Filter\OptionalParametersFilter();
  $this->filterComposite
    ->addFilter('is', new Filter\IsFilter());
  $this->filterComposite
    ->addFilter('has', new Filter\HasFilter());
  $this->filterComposite
    ->addFilter('get', new Filter\GetFilter());
  $this->filterComposite
    ->addFilter('parameter', new Filter\OptionalParametersFilter(), Filter\FilterComposite::CONDITION_AND);
}