Exemple #1
0
 protected function _applyDecorators($dataset)
 {
     $toolkit = lmbToolkit::instance();
     foreach ($this->decorators as $decorator_data) {
         $class_path = new lmbClassPath($decorator_data[0]);
         $dataset = $class_path->createObject(array($dataset));
         $this->_addParamsToDataset($dataset, $decorator_data[1]);
     }
     return $dataset;
 }
Exemple #2
0
 protected function _createTableObjectByAlias($class_path_alias)
 {
     $class_path = new lmbClassPath($class_path_alias);
     return $class_path->createObject();
 }
 static function create($path, $args = array())
 {
     $class_path = new lmbClassPath($path);
     return $class_path->createObject($args);
 }
 function testExpandConstants()
 {
     file_put_contents(LIMB_VAR_DIR . '/FooBarZooTest2.class.php', "<?php\n class FooBarZooTest2{}\n ?>");
     $class_path = new lmbClassPath('{LIMB_VAR_DIR}/FooBarZooTest2');
     $this->assertEqual(get_class($class_path->createObject()), 'FooBarZooTest2');
     unlink(LIMB_VAR_DIR . '/FooBarZooTest2.class.php');
 }