当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Db_Table::getDecoratableMethods方法代码示例

本文整理汇总了PHP中Zend_Db_Table::getDecoratableMethods方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Db_Table::getDecoratableMethods方法的具体用法?PHP Zend_Db_Table::getDecoratableMethods怎么用?PHP Zend_Db_Table::getDecoratableMethods使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Db_Table的用法示例。


在下文中一共展示了Zend_Db_Table::getDecoratableMethods方法的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::getDecoratableMethods方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。