Exemplo n.º 1
0
 /**
  * @param	DictionaryInterface $options
  * @return	Criteria
  */
 public function __construct(array $exprs = null, array $params = null)
 {
     /* default value is an empty array */
     if (null !== $exprs) {
         $this->setExprLists($exprs);
     }
     /* add any parameters */
     if (null !== $params) {
         parent::__construct($params);
     }
 }
Exemplo n.º 2
0
 /**
  * @param	array	$data
  * @return	MvcRouteDetail
  */
 public function __construct(array $data)
 {
     if (isset($data['is-public']) && true === $data['is-public']) {
         $this->isPublic = true;
     }
     if (isset($data['is-internal']) && true === $data['is-internal']) {
         $this->isInternal = true;
     }
     if (isset($data['acl-access'])) {
         $this->setAclCodes($data['acl-access']);
     }
     if (isset($data['is-ignore-acl']) && true === $data['is-ignore-acl']) {
         $this->isIgnoreAcl = true;
     }
     if (isset($data['intercept'])) {
         $this->setInterceptingFilters($data['intercept']);
     }
     if (isset($data['startup'])) {
         $this->setStartup($data['startup']);
     }
     if (isset($data['is-view']) && false === $data['is-view']) {
         $this->disableView();
     }
     if (isset($data['is-manual-view']) && true === $data['is-manual-view']) {
         $this->enableManualView();
     }
     if (isset($data['raw-view'])) {
         $this->setRawView($data['raw-view']);
     }
     if (isset($data['view-pkg'])) {
         $this->setViewPackage($data['view-pkg']);
     }
     if (isset($data['view-params'])) {
         $this->setViewParams($data['view-params']);
     }
     $params = array();
     if (isset($data['params']) && is_array($data['params'])) {
         $params = $data['params'];
     }
     if (!isset($data['action-name'])) {
         $err = "action name must be defined. This is the class name of ";
         $err .= "mvc action used by this route. key is -(action-name)";
         throw new InvalidArgumentException($err);
     }
     $this->setActionName($data['action-name']);
     if (isset($data['action-class'])) {
         $this->setActionClass($class);
     }
     parent::__construct($params);
 }