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


PHP Core::amake方法代码示例

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


在下文中一共展示了Core::amake方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: make_handler

 /**
  * @param string $name
  * @param array  $args
  *
  * @return Log_Handler
  */
 public static function make_handler($name, array $args)
 {
     if (!isset(self::$handlers[$name])) {
         throw new Log_UnknownHandlerException($name);
     }
     return Core::amake(self::$handlers[$name], $args);
 }
开发者ID:techart,项目名称:tao,代码行数:13,代码来源:Log.php

示例2: factory

 public static function factory(XMLReader $reader)
 {
     switch ($reader->nodeType) {
         case XMLREADER::ELEMENT:
             $module = 'XML.Reader.Element';
             break;
         case XMLREADER::ATTRIBUTE:
             $module = 'XML.Reader.Attribute';
             break;
         default:
             $module = 'XML.Reader.Node';
             break;
     }
     return Core::amake($module, func_get_args());
 }
开发者ID:techart,项目名称:tao,代码行数:15,代码来源:Node.php

示例3: agregator

 public static function agregator()
 {
     $args = func_get_args();
     return Core::amake('Templates.HTML.Assets.Agregator', $args);
 }
开发者ID:techart,项目名称:tao,代码行数:5,代码来源:Assets.php

示例4: Writer

 public static function Writer()
 {
     $args = func_get_args();
     return Core::amake('XML.Writer', $args);
 }
开发者ID:techart,项目名称:tao,代码行数:5,代码来源:XML.php

示例5: make_entity

 /**
  * Создает объект сущности класса, имя которого указано в опции classname
  *
  * @return mixed
  */
 public function make_entity()
 {
     $args = func_get_args();
     switch (count($args)) {
         case 0:
             $args = array(array(), $this->clear());
             break;
         default:
             $args[] = $this->clear();
             break;
     }
     $entity = isset($this->options['classname']) ? Core::amake($this->options['classname'], $args) : Core::make(DB::option('collection_class'));
     if (method_exists($entity, 'defaults')) {
         $entity->defaults($this->options['defaults']);
     } else {
         $array_access = $entity instanceof ArrayAccess;
         foreach ($this->options['defaults'] as $k => $v) {
             if ($array_access && !isset($entity[$k])) {
                 $entity[$k] = $v;
             } else {
                 if (!isset($entity->{$k})) {
                     $entity->{$k} = $v;
                 }
             }
         }
     }
     //$entity->mapper = $this->clear();
     $entity->after_make();
     return $entity;
 }
开发者ID:techart,项目名称:tao,代码行数:35,代码来源:ORM.php

示例6: __call

 public function __call($name, $args)
 {
     if (!isset($this->instance[$name])) {
         if ($this->default_storage) {
             $this->add($name, $this->default_storage);
         } else {
             return null;
         }
     }
     $class = $this->instance[$name];
     $res = null;
     if (is_object($class)) {
         $res = $class;
     } else {
         $class = (string) $class;
         Core::autoload($class);
         $res = Core::amake($class, $args);
     }
     $res->__set_name($name);
     return $res;
 }
开发者ID:techart,项目名称:tao,代码行数:21,代码来源:Storage.php

示例7: HMACSHA1

 /**
  * @return Service_OAuth_HMACSHA1
  */
 public static function HMACSHA1()
 {
     $args = func_get_args();
     return Core::amake('Service.OAuth.HMACSHA1', $args);
 }
开发者ID:techart,项目名称:tao,代码行数:8,代码来源:OAuth.php

示例8: build_middleware

 /**
  * Строит цепочку middleware-компонент
  *
  * @param WS_ServiceInterface $app
  *
  * @return WS_ServiceInterface
  */
 protected function build_middleware(WS_ServiceInterface $app)
 {
     foreach (array_reverse($this->middleware) as $name => $conf) {
         if ($conf['class'] instanceof WS_ServiceInterface) {
             $conf['class']->set_application($app);
             $app = $conf['class'];
         } else {
             $this->load_module_for($c = $this->complete_name((string) $conf['class']));
             $app = Core::amake($c, array_merge(array($app), $conf['parms']));
         }
     }
     $this->middleware = array();
     return $app;
 }
开发者ID:techart,项目名称:tao,代码行数:21,代码来源:DSL.php

示例9: make_auth

 /**
  * @return Service_OpenSocial_AuthAdapter
  */
 protected function make_auth()
 {
     if ($this->auth[0] instanceof Service_OpenSocial_AuthAdapter) {
         return $this->auth[0];
     } else {
         Core::load($m = 'Service.OpenSocial.Auth.' . $this->auth[0]);
         return Core::amake("{$m}.Adapter", array_slice($this->auth, 1));
     }
 }
开发者ID:techart,项目名称:tao,代码行数:12,代码来源:DSL.php

示例10: Event

 public static function Event()
 {
     $args = func_get_args();
     return Core::amake('Events.Event', $args);
 }
开发者ID:techart,项目名称:tao,代码行数:5,代码来源:Events.php

示例11: new_instance_of

 /**
  * Создает объект класса map[$name] c параметрами конструктора $args.
  *
  * @uses self::$map
  *
  * @param mixed $name Должен быть ключом массива, установленного ранее
  *                    через $this->map() или $this->map_list(). Значением ключа должен быть
  *                    либо объект либо имя класса
  *
  * @see  Core::reflection_for()
  * @see  Core::amake()
  *
  * @param array $args Параметры, передаваемые конструктору класса
  *
  * @throws Core_InvalidArgumentValueException Если ключ $name отсутствует в массиве $map
  *
  * @return object
  */
 public function new_instance_of($name, $args = array())
 {
     if (isset($this->map[$name])) {
         return Core::amake($this->map[$name], $args);
     } else {
         throw new Core_InvalidArgumentValueException('name', $name);
     }
 }
开发者ID:techart,项目名称:tao,代码行数:26,代码来源:Object.php

示例12: Service

 /**
  * Создает объект класса WS.Middleware.Cache.Service
  *
  * @param WS_ServiceInterface $application
  * @param string              $dsn
  * @param array()             $urls
  *
  * @return WS_Middleware_Cache_Service
  */
 public static function Service(WS_ServiceInterface $application)
 {
     $args = func_get_args();
     return Core::amake('WS.Middleware.Cache.Service', $args);
 }
开发者ID:techart,项目名称:tao,代码行数:14,代码来源:Cache.php

示例13: load_application

 /**
  * @param string|array $app
  *
  * @return WS_REST_Application
  */
 protected function load_application($name, $parms = array())
 {
     $app = $this->mappings[$name];
     if (empty($app)) {
         return null;
     }
     $class_name = $app['class'];
     $instance = Core::amake($class_name, array($app['prefix'], array_merge($parms, $app['param'])));
     $instance->name = $name;
     if ($instance instanceof WS_Services_REST_Application) {
         return $instance;
     } else {
         throw new WS_Services_REST_Exception('Incompatible application class: ' . Core_Types::virtual_class_name_for($class_name));
     }
 }
开发者ID:techart,项目名称:tao,代码行数:20,代码来源:REST.php

示例14: build_apache_auth_module

 public static function build_apache_auth_module()
 {
     $config = Config::all()->apache_auth;
     $module = Core::if_not($config->module, 'WS.Auth.Apache.RemoteAuthModule');
     $args = Core::if_not($config->module_args, array());
     $instance = Core::amake($module, $args);
     return $instance;
 }
开发者ID:techart,项目名称:tao,代码行数:8,代码来源:CMS.php

示例15: PasswordEncoder

 /**
  * Создает и сохраняет экземпляр класса кодировщика паролей
  *
  * Используется класс из опции password_encoder_class.
  * В конструктор передается соль из опции password_salt
  */
 public static function PasswordEncoder()
 {
     if (!is_null(self::$encoder)) {
         return self::$encoder;
     }
     $args = Core::normalize_args(func_get_args());
     $salt = self::option('password_salt');
     if (!empty($salt) && (!isset($args[0]) || empty($args[0]))) {
         $args[0] = $salt;
     }
     $class = self::option('password_encoder_class');
     if (!is_null(self::option('password_encoder_callback'))) {
         $class = 'Digest.PasswordCallbackEncoder';
         $salt = isset($args[0]) ? $args[0] : null;
         $args[0] = self::option('password_encoder_callback');
         $args[1] = $salt;
     }
     return self::$encoder = Core::amake($class, $args);
 }
开发者ID:techart,项目名称:tao,代码行数:25,代码来源:Digest.php


注:本文中的Core::amake方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。