當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Db_Table::getRepresentedEntity方法代碼示例

本文整理匯總了PHP中Zend_Db_Table::getRepresentedEntity方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Db_Table::getRepresentedEntity方法的具體用法?PHP Zend_Db_Table::getRepresentedEntity怎麽用?PHP Zend_Db_Table::getRepresentedEntity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Db_Table的用法示例。


在下文中一共展示了Zend_Db_Table::getRepresentedEntity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param Pandamp_BeanContext_Decoratable $mixed  The table class to model, or the classname
  * as a string of the model to decorate. The class will then try to
  * load the class and instantiate it with no arguments.
  * @param Pandamp_Filter_Input $filter An optional filter that gets processed before the
  * data is returned. The flter will only be used if teh data is decorated as dto or entity
  * @param boolean $strict if set to false, mising setters for any property available will not
  * throw an exception
  *
  * @throws Exception
  */
 public final function __construct($mixed, Pandamp_Filter_Input $filter = null, $strict = true)
 {
     $this->_filter = $filter;
     $this->_strict = $strict;
     if (is_string($mixed)) {
         Pandamp_BeanContext_Inspector::loadClass($mixed);
         if (!class_exists($mixed)) {
             throw new Exception("Could not find class to decorate \"{$mixed}\".");
         }
         $this->_decoratedModel = new $mixed();
     } else {
         $this->_decoratedModel = $mixed;
     }
     if (!$this->_decoratedModel instanceof Pandamp_BeanContext_Decoratable) {
         throw new Exception("Decorated class is no subclass of \"Pandamp_BeanContext_Decoratable\"");
     }
     $this->_decoratedMethods = $this->_decoratedModel->getDecoratableMethods();
     $this->_entity = $this->_decoratedModel->getRepresentedEntity();
     Pandamp_BeanContext_Inspector::loadClass($this->_entity);
     if (!class_exists($this->_entity)) {
         throw new Exception("Could not find entity \"" . $this->_entity . "\".");
     }
     $refC = new ReflectionClass($this->_entity);
     if (!$refC->implementsInterface('Pandamp_BeanContext')) {
         throw new Exception("Entity \"" . $this->_entity . "\" is not a \"Pandamp_BeanContext\"-class.");
     }
 }
開發者ID:hukumonline,項目名稱:quart80,代碼行數:40,代碼來源:Decorator.php


注:本文中的Zend_Db_Table::getRepresentedEntity方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。