コード例 #1
0
ファイル: property.php プロジェクト: walteraries/anahita
 /**
  * Configurator
  *
  * @param KConfig $config Property Configuration 
  * 
  * @return void
  */
 public function setConfig(KConfig $config)
 {
     $identifier = $config->description->getRepository()->getIdentifier();
     if ($config->parent) {
         $this->_parent = KService::getIdentifier($config->parent);
         //adopt the child application
         if (!$this->_parent->application) {
             $this->_parent->application = $identifier->application;
         }
     }
     parent::setConfig($config);
     if ($config->child) {
         if (strpos($config->child, '.') === false) {
             $identifier = clone $this->_parent;
             $identifier->name = $config->child;
             $config->child = $identifier;
         }
         $this->_child = KService::getIdentifier($config->child);
         //adopt the parent application
         if (!$this->_child->application) {
             $this->_child->application = $identifier->application;
         }
     }
     $this->_parent_key = $config->parent_key;
     if (is_array($config->query)) {
         $config->query = new KConfig($config->query);
     }
     $this->_query_filters = $config->query;
 }
コード例 #2
0
ファイル: property.php プロジェクト: stonyyi/anahita
 /**
  * Configurator.
  *
  * @param KConfig $config Property Configuration
  */
 public function setConfig(KConfig $config)
 {
     parent::setConfig($config);
     $this->_type = $config->type;
     if (!$this->isScalar()) {
         $this->_type = AnDomainAttribute::getClassname($this->_type);
     }
     $this->_default = $config->default;
     $this->_format = $config->format;
     $this->_column = $config->column;
 }