/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options. */ public function __construct(ObjectConfig $config) { parent::__construct($config); //Set the table identifier $this->_table = $config->table; // Set the table identifier if (isset($config->identity_column)) { $this->_identity_column = $config->identity_column; } // Clear the row $this->clear(); //Set the status if (isset($config->status)) { $this->setStatus($config->status); } // Set the row data if (isset($config->data)) { $this->setProperties($config->data->toArray(), $this->isNew()); unset($config->data); } //Set the status message if (!empty($config->status_message)) { $this->setStatusMessage($config->status_message); } }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options * @return ObjectArray */ public function __construct(ObjectConfig $config) { parent::__construct($config); $parameters = ObjectConfig::unbox($config->parameters); foreach ($parameters as $key => $values) { $this->set($key, $values); } }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options * @return UserSessionContainerAbstract */ public function __construct(ObjectConfig $config) { parent::__construct($config); //Set the attribute session namespace $this->setNamespace($config->namespace); //Set the attribute session separator $this->_separator = $config->separator; }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options * @return ObjectArray */ public function __construct(ObjectConfig $config) { parent::__construct($config); if (empty($config->model)) { throw new \InvalidArgumentException('model [ModelInterface] config option is required'); } if (!$config->model instanceof ModelInterface) { throw new \UnexpectedValueException('Model: ' . get_class($config->model) . ' does not implement ModelInterface'); } $this->_model = $config->model; }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options * @return UserSessionContainerAbstract */ public function __construct(ObjectConfig $config) { parent::__construct($config); //@TODO : Fix this. If we don't hardcode it, it gets set to __nooku. $config->namespace = '__nooku_' . $this->getIdentifier()->name; //Set the attribute session namespace $this->setNamespace($config->namespace); //Set the attribute session separator $this->_separator = $config->separator; //Load the session data $this->loadSession(); }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options. */ public function __construct(ObjectConfig $config) { parent::__construct($config); $this->_identity_key = $config->identity_key; // Clear the entity $this->clear(); //Set the status if (isset($config->status)) { $this->setStatus($config->status); } // Set the entity data if (isset($config->data)) { $this->setProperties($config->data->toArray(), $this->isNew()); } //Set the status message if (!empty($config->status_message)) { $this->setStatusMessage($config->status_message); } }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options. */ public function __construct(ObjectConfig $config) { ObjectArray::__construct($config); $this->_identity_key = $config->identity_key; //Set the status if (isset($config->status)) { $this->_status = $config->status; } // Set the entity data if (isset($config->data)) { $this->_data = $config->data->toArray(); } else { $this->_data = array(); } //Set the status message if (!empty($config->status_message)) { $this->_status_message = $config->status_message; } }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options * @return ObjectArray */ public function __construct(ObjectConfig $config) { parent::__construct($config); //Add the parameters $this->add(ObjectConfig::unbox($config->parameters)); }