• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Zend_Loader类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getView

 /**
  * Get view
  *
  * @param Zend_Config $config
  * @return Zend_View_Interface
  */
 public function getView(Zend_Config $config)
 {
     if (!($view = $this->getCache('view'))) {
         $isUseViewRenderer = !Zend_Controller_Front::getInstance()->getParam('noViewRenderer');
         $viewRenderer = $isUseViewRenderer ? Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer') : null;
         // Use view from view renderer if possible
         if ($isUseViewRenderer && $viewRenderer->view instanceof Zend_View_Interface) {
             $view = $viewRenderer->view;
         } else {
             $viewClass = $config->get('class');
             Zend_Loader::loadClass($viewClass);
             $view = new $viewClass();
             // Validate object
             if (!$view instanceof Zend_View_Interface) {
                 /**
                  * @see Zym_App_Resource_View_Exception
                  */
                 require_once 'Zym/App/Resource/View/Exception.php';
                 throw new Zym_App_Resource_View_Exception(sprintf('View object must be an instance of Zend_View_Interface an object of %s', get_class($view)));
             }
         }
         // Setup
         $this->_setupView($view, $config);
         // Save
         $this->saveCache($view, 'view');
     }
     return $view;
 }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:34,代码来源:View.php


示例2: connectToGoogleViaZend

 private function connectToGoogleViaZend()
 {
     set_include_path($this->root_directory . "modules/Calendar4You/");
     require_once 'Zend/Loader.php';
     Zend_Loader::loadClass('Zend_Gdata');
     Zend_Loader::loadClass('Zend_Gdata_AuthSub');
     Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
     Zend_Loader::loadClass('Zend_Gdata_Calendar');
     if ($this->user_login != "" && $this->user_password != "") {
         try {
             $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;
             $this->gClient = Zend_Gdata_ClientLogin::getHttpClient($this->user_login, $this->user_password, $service);
             $this->status = $this->mod_strings["LBL_OK"];
             $this->is_logged = true;
         } catch (Zend_Gdata_App_CaptchaRequiredException $cre) {
             $this->status = $this->mod_strings["LBL_URL_CAPTCHA_IMAGE"] . ': ' . $cre->getCaptchaUrl() . ', ' . $this->mod_strings["LBL_TOKEN_ID"] . ': ' . $cre->getCaptchaToken();
         } catch (Zend_Gdata_App_AuthException $ae) {
             $this->status = $this->mod_strings["LBL_AUTH_PROBLEM"] . ': ' . $ae->exception() . "\n";
         }
     } else {
         $this->status = $this->mod_strings["LBL_MISSING_AUTH_DATA"];
     }
     if ($this->is_logged) {
         $this->gService = new Zend_Gdata_Calendar($this->gClient);
         try {
             $this->gListFeed = $this->gService->getCalendarListFeed();
         } catch (Zend_Gdata_App_Exception $e) {
             $this->gListFeed = array();
         }
     }
     set_include_path($this->root_directory);
 }
开发者ID:mslokhat,项目名称:corebos,代码行数:32,代码来源:GoogleSync4You.php


示例3: isValid

 /**
  * Defined by Zend_Validate_Interface
  *
  * Returns true if the mimetype of the file does not matche the given ones. Also parts
  * of mimetypes can be checked. If you give for example "image" all image
  * mime types will not be accepted like "image/gif", "image/jpeg" and so on.
  *
  * @param  string $value Real file to check for mimetype
  * @param  array  $file  File data from Zend_File_Transfer
  * @return boolean
  */
 public function isValid($value, $file = null)
 {
     // Is file readable ?
     require_once 'Zend/Loader.php';
     if (!Zend_Loader::isReadable($value)) {
         return $this->_throw($file, self::NOT_READABLE);
     }
     if ($file !== null) {
         if (class_exists('finfo', false) && defined('MAGIC')) {
             $mime = new finfo(FILEINFO_MIME);
             $this->_type = $mime->file($value);
             unset($mime);
         } elseif (function_exists('mime_content_type') && ini_get('mime_magic.magicfile')) {
             $this->_type = mime_content_type($value);
         } else {
             $this->_type = $file['type'];
         }
     }
     if (empty($this->_type)) {
         return $this->_throw($file, self::NOT_DETECTED);
     }
     $mimetype = $this->getMimeType(true);
     if (in_array($this->_type, $mimetype)) {
         return $this->_throw($file, self::FALSE_TYPE);
     }
     $types = explode('/', $this->_type);
     $types = array_merge($types, explode('-', $this->_type));
     foreach ($mimetype as $mime) {
         if (in_array($mime, $types)) {
             return $this->_throw($file, self::FALSE_TYPE);
         }
     }
     return true;
 }
开发者ID:quangbt2005,项目名称:vhost-kis,代码行数:45,代码来源:ExcludeMimeType.php


示例4: setUp

 public function setUp()
 {
     if (!class_exists('Archive_Tar')) {
         // require_once 'Zend/Loader.php';
         try {
             Zend_Loader::loadClass('Archive_Tar');
         } catch (Zend_Exception $e) {
             $this->markTestSkipped('This filter needs PEARs Archive_Tar');
         }
     }
     $files = array(dirname(__FILE__) . '/../_files/zipextracted.txt', dirname(__FILE__) . '/../_files/_compress/Compress/First/Second/zipextracted.txt', dirname(__FILE__) . '/../_files/_compress/Compress/First/Second', dirname(__FILE__) . '/../_files/_compress/Compress/First/zipextracted.txt', dirname(__FILE__) . '/../_files/_compress/Compress/First', dirname(__FILE__) . '/../_files/_compress/Compress/zipextracted.txt', dirname(__FILE__) . '/../_files/_compress/Compress', dirname(__FILE__) . '/../_files/_compress/zipextracted.txt', dirname(__FILE__) . '/../_files/_compress', dirname(__FILE__) . '/../_files/compressed.tar');
     foreach ($files as $file) {
         if (file_exists($file)) {
             if (is_dir($file)) {
                 rmdir($file);
             } else {
                 unlink($file);
             }
         }
     }
     if (!file_exists(dirname(__FILE__) . '/../_files/Compress/First/Second')) {
         mkdir(dirname(__FILE__) . '/../_files/Compress/First/Second', 0777, true);
         file_put_contents(dirname(__FILE__) . '/../_files/Compress/First/Second/zipextracted.txt', 'compress me');
         file_put_contents(dirname(__FILE__) . '/../_files/Compress/First/zipextracted.txt', 'compress me');
         file_put_contents(dirname(__FILE__) . '/../_files/Compress/zipextracted.txt', 'compress me');
     }
 }
开发者ID:netvlies,项目名称:zf,代码行数:27,代码来源:TarTest.php


示例5: fetchTable

 public function fetchTable($table_name, $where = false, $parameters = array())
 {
     $range = isset($parameters['range']) && !empty($parameters['range']) ? $parameters['range'] : " * ";
     $sortColumn = isset($parameters['sortColumn']) && !empty($parameters['sortColumn']) ? $parameters['sortColumn'] : false;
     $sortType = isset($parameters['sortType']) && !empty($parameters['sortType']) ? $parameters['sortType'] : "ASC";
     $limitOffset = isset($parameters['limitOffset']) && !empty($parameters['limitOffset']) ? $parameters['limitOffset'] : false;
     $rowCount = isset($parameters['rowCount']) && !empty($parameters['rowCount']) ? $parameters['rowCount'] : false;
     $queryString = "SELECT {$range} FROM {$table_name} ";
     if ($where !== false) {
         $queryString .= " WHERE " . $where;
     }
     if ($sortColumn !== false) {
         $queryString .= " ORDER BY {$sortColumn} {$sortType} ";
     }
     if ($rowCount !== false) {
         $queryString .= " LIMIT ";
         if ($limitOffset !== false) {
             $queryString .= " {$limitOffset}, ";
         }
         $queryString .= " {$rowCount} ";
     }
     $db = $this->_db->query($queryString);
     $dataFetch = $db->fetchAll(Zend_Db::FETCH_ASSOC);
     $data = array('table' => $this, 'data' => $dataFetch, 'rowClass' => $this->_rowClass, 'stored' => true);
     Zend_Loader::loadClass($this->_rowsetClass);
     if (count($dataFetch) < 1) {
         return false;
     } else {
         return new $this->_rowsetClass($data);
     }
 }
开发者ID:hukumonline,项目名称:quart80,代码行数:31,代码来源:Queue.php


示例6: setAdapter

 /**
  * Sets new encryption options
  *
  * @param  string|array $options (Optional) Encryption options
  * @return Zend_Filter_Encrypt
  */
 public function setAdapter($options = null)
 {
     if (is_string($options)) {
         $adapter = $options;
     } else {
         if (isset($options['adapter'])) {
             $adapter = $options['adapter'];
             unset($options['adapter']);
         } else {
             $adapter = 'Mcrypt';
         }
     }
     if (!is_array($options)) {
         $options = array();
     }
     if (Zend_Loader::isReadable('Zend/Filter/Encrypt/' . ucfirst($adapter) . '.php')) {
         $adapter = 'Zend_Filter_Encrypt_' . ucfirst($adapter);
     }
     Zend_Loader::loadClass($adapter);
     $this->_adapter = new $adapter($options);
     if (!$this->_adapter instanceof Zend_Filter_Encrypt_Interface) {
         require_once 'Zend/Filter/Exception.php';
         throw new Zend_Filter_Exception("Encoding adapter '" . $adapter . "' does not implement Zend_Filter_Encrypt_Interface");
     }
     return $this;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:32,代码来源:Encrypt.php


示例7: newAction

 public function newAction()
 {
     $this->view->message = "Nothing is saved";
     $req = $this->getRequest();
     $item = $req->getParam('guid');
     $relatedItem = $req->getParam('relatedGuid');
     $as = $req->getParam('relateAs');
     Zend_Loader::loadClass('Kutu_Core_Orm_Table_Catalog');
     $tblCatalog = new Kutu_Core_Orm_Table_Catalog();
     if (empty($relatedItem)) {
         $this->view->message = "No relatedGuid specified!";
     }
     //check if $guid is an array
     if (is_array($item)) {
         foreach ($item as $guid) {
             echo "<br>" . $guid;
             $rowCatalog = $tblCatalog->find($guid)->current();
             echo $rowCatalog->guid;
             $rowCatalog->relateTo($relatedItem, $as);
         }
     } else {
         $rowCatalog = $tblCatalog->find($item)->current();
         $rowCatalog->relateTo($relatedItem, $as);
         $this->view->message = "Data was successfully saved";
     }
 }
开发者ID:psykomo,项目名称:kutump-enhanced,代码行数:26,代码来源:RelationController.php


示例8: loadTests

 /**
  * recurses through the Test subdir and includes classes in each test group subdir,
  * then builds an array of classnames for the tests that will be run
  *
  */
 public function loadTests($test_path = NULL)
 {
     $this->resetStats();
     if ($test_path === NULL) {
         // this seems hackey.  is it?  dunno.
         $test_path = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'Security' . DIRECTORY_SEPARATOR . 'Test';
     }
     $test_root = dir($test_path);
     while (false !== ($entry = $test_root->read())) {
         if (is_dir($test_root->path . DIRECTORY_SEPARATOR . $entry) && !preg_match('|^\\.(.*)$|', $entry)) {
             $test_dirs[] = $entry;
         }
     }
     // include_once all files in each test dir
     foreach ($test_dirs as $test_dir) {
         $this_dir = dir($test_root->path . DIRECTORY_SEPARATOR . $test_dir);
         while (false !== ($entry = $this_dir->read())) {
             if (!is_dir($this_dir->path . DIRECTORY_SEPARATOR . $entry) && preg_match('/[A-Za-z]+\\.php/i', $entry)) {
                 $className = "Zend_Environment_Security_Test_" . $test_dir . "_" . basename($entry, '.php');
                 Zend_Loader::loadClass($className);
                 $classNames[] = $className;
             }
         }
     }
     $this->_tests_to_run = $classNames;
 }
开发者ID:jon9872,项目名称:zend-framework,代码行数:31,代码来源:Security.php


示例9: init

 function init()
 {
     parent::init();
     $this->view->baseUrl = $this->_request->getBaseUrl();
     Zend_Loader::loadClass('Pages');
     Zend_Loader::loadClass('Produkty');
 }
开发者ID:stasiu38,项目名称:cms,代码行数:7,代码来源:SzukajController.php


示例10: init

 public function init()
 {
     Zend_Loader::loadClass('Zend_Validate_Regex');
     // translate
     $this->translate = Zend_Registry::get('translate');
     //Zend_Form::setDefaultTranslator( Zend_Registry::get('translate') );
     // login attempt
     $defNamespace = new Zend_Session_Namespace('Default');
     $use_captcha = $defNamespace->numLoginFails >= self::MAX_LOGIN_ATTEMPT ? TRUE : FALSE;
     $this->setMethod('post');
     // username
     $login = $this->createElement('text', 'login', array('decorators' => $this->elDecorators, 'required' => true, 'label' => $this->translate->_('Username'), 'size' => 25, 'maxlength' => 50));
     $login->addDecorator('FormElements', array('tag' => 'div', 'style' => 'width:10em; background-color:#E0F0FF;'));
     $login_validator = new Zend_Validate_Regex('/^[a-z0-9\\-_@\\.]+$/i');
     $login_validator->setMessage($this->translate->_('Login characters incorrect. Allowed: alphabetical characters, digits, and "- . _ @" characters.'));
     $login->addValidator($login_validator)->addValidator('stringLength', false, array(1, 50))->setRequired(true);
     // password
     $password = $this->createElement('password', 'pwd', array('decorators' => $this->elDecorators, 'required' => true, 'label' => $this->translate->_('Password'), 'size' => 25, 'maxlength' => 50));
     $password->addValidator('StringLength', false, array(1, 50))->setRequired(true);
     // remember me
     $checkbox = $this->createElement('checkbox', 'rememberme', array('decorators' => $this->elDecorators, 'label' => $this->translate->_('Remember me'), 'checked' => 1));
     // login
     $submit = $this->createElement('submit', 'submit', array('decorators' => array('ViewHelper', 'Errors'), 'class' => 'login-btn', 'id' => 'submit', 'label' => $this->translate->_('Log In')));
     // add elements to form
     $this->addElement($login)->addElement($password)->addElement($checkbox)->addElement($submit);
     if ($use_captcha) {
         // create captcha
         $captcha = $this->createElement('captcha', 'captcha', array('label' => $this->translate->_('Type the characters:'), 'captcha' => array('captcha' => 'Figlet', 'wordLen' => 3, 'timeout' => 120)));
         // And finally add some CSRF protection
         $csrf = $this->createElement('hash', 'csrf', array('ignore' => true));
         // add captcha to form
         $this->addElement($captcha)->addElement($csrf);
     }
 }
开发者ID:staser,项目名称:webacula,代码行数:34,代码来源:FormLogin.php


示例11: getById

 function getById($jobid)
 {
     // do Bacula ACLs
     Zend_Loader::loadClass('Job');
     $table = new Job();
     if (!$table->isJobIdExists($jobid)) {
         return FALSE;
     }
     $select = new Zend_Db_Select($this->db);
     switch ($this->db_adapter) {
         case 'PDO_SQLITE':
             // bug http://framework.zend.com/issues/browse/ZF-884
             $select->distinct();
             $select->from(array('l' => 'Log'), array('logid' => 'LogId', 'jobid' => 'JobId', 'LogTime' => 'Time', 'logtext' => 'LogText'));
             $select->where("JobId = ?", $jobid);
             $select->order(array('LogId', 'LogTime'));
             break;
         default:
             // mysql, postgresql
             $select->distinct();
             $select->from(array('l' => 'Log'), array('LogId', 'JobId', 'LogTime' => 'Time', 'LogText'));
             $select->where("JobId = ?", $jobid);
             $select->order(array('LogId', 'LogTime'));
     }
     //$sql = $select->__toString(); echo "<pre>$sql</pre>"; exit; // for !!!debug!!!
     $stmt = $select->query();
     return $stmt->fetchAll();
 }
开发者ID:neverstoplwy,项目名称:contrib-webacula,代码行数:28,代码来源:Log.php


示例12: init

 /**
  * Método Construtor
  *
  * @see Contribuinte_Lib_Controller_AbstractController::init()
  */
 public function init()
 {
     parent::init();
     // Carrega as classes para geração do PDF
     Zend_Loader::loadClass('fpdf', APPLICATION_PATH . '/../library/FPDF/');
     Zend_Loader::loadClass('Fpdf2File', APPLICATION_PATH . '/../library/FPDF/');
 }
开发者ID:arendasistemasintegrados,项目名称:mateusleme,代码行数:12,代码来源:RelatorioController.php


示例13: loginAction

 function loginAction()
 {
     $this->view->message = '';
     if ($this->_request->isPost()) {
         Zend_Loader::loadClass('Zend_Filter_StripTags');
         $f = new Zend_Filter_StripTags();
         $username = $f->filter($this->_request->getPost('username'));
         $password = md5($f->filter($this->_request->getPost('password')));
         if (!empty($username)) {
             Zend_Loader::loadClass('Zend_Auth_Adapter_DbTable');
             $dbAdapter = Zend_Registry::get('dbAdapter');
             $authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);
             $authAdapter->setTableName('utilisateur');
             $authAdapter->setIdentityColumn('login_utilisateur');
             $authAdapter->setCredentialColumn('pass_utilisateur');
             $authAdapter->setIdentity($username);
             $authAdapter->setCredential($password);
             $auth = Zend_Auth::getInstance();
             $result = $auth->authenticate($authAdapter);
             if ($result->isValid()) {
                 $data = $authAdapter->getResultRowObject(null, 'password');
                 $auth->getStorage()->write($data);
                 $this->_redirect('/');
             }
         }
         $this->_redirect('auth/loginfail');
     }
 }
开发者ID:Zabu,项目名称:MTA,代码行数:28,代码来源:AuthController.php


示例14: unserialize

 public static function unserialize($cached)
 {
     if (isset($cached['_class']) && !class_exists($cached['_class'])) {
         \Zend_Loader::loadClass($cached['_class']);
     }
     return unserialize(gzuncompress($cached['content']));
 }
开发者ID:crapougnax,项目名称:t41,代码行数:7,代码来源:Registry.php


示例15: setup

 /**
  * Setup db
  *
  */
 public function setup(Zend_Config $config)
 {
     $sessionConfig = $config->get('config');
     $configArray = $sessionConfig->toArray();
     // save_path handler
     $configArray = $this->_prependSavePath($configArray);
     // name handler
     $configArray = $this->_parseName($configArray);
     // Setup config
     Zend_Session::setOptions($configArray);
     // Setup save handling?
     $saveHandlerConfig = $config->get('save_handler');
     if ($className = $saveHandlerConfig->get('class_name')) {
         if ($args = $saveHandlerConfig->get('constructor_args')) {
             if ($args instanceof Zend_Config) {
                 $args = $args->toArray();
             } else {
                 $args = (array) $args;
             }
         } else {
             $args = array();
         }
         require_once 'Zend/Loader.php';
         Zend_Loader::loadClass($className);
         $saveHandler = new ReflectionClass($className);
         $saveHandler = $saveHandler->newInstanceArgs($args);
         Zend_Session::setSaveHandler($saveHandler);
     }
     // Autostart session?
     if ($config->get('auto_start')) {
         // Start session
         Zend_Session::start();
     }
 }
开发者ID:BGCX262,项目名称:zym-svn-to-git,代码行数:38,代码来源:Session.php


示例16: _traverseFolder

 protected function _traverseFolder($folderGuid, $sGuid, $level)
 {
     Zend_Loader::loadClass('Kutu_Core_Orm_Table_Folder');
     $tblFolder = new Kutu_Core_Orm_Table_Folder();
     $rowSet = $tblFolder->fetchChildren($folderGuid);
     $row = $tblFolder->find($folderGuid)->current();
     $sGuid = '';
     if (count($rowSet)) {
         $sGuid = '<li>' . "<a href='" . KUTU_ROOT_URL . "/pages/g/{$row->guid}/h/1'>" . $row->title . '</a><ul>';
     } else {
         $sGuid = '<li>' . "<a href='" . KUTU_ROOT_URL . "/pages/g/{$row->guid}/h/1'>" . $row->title . '</a>';
     }
     if (true) {
         //echo $level;
         foreach ($rowSet as $row) {
             //$sTab = '<ul>';
             //$sTab = '';
             //for($i=0;$i<$level;$i++)
             //$sTab .= '<li>';
             //$option = '<option value="'.$row->guid.'">'.$sTab.$row->title.'</option>';
             //$option = '"'.$row->guid.'" :'.'"'.$sTab.$row->title.'",';
             //$option = $sTab.$row->title;
             $sGuid .= $this->_traverseFolder($row->guid, '', $level + 1) . "";
             //$sGuid .= $sTab.$row->title . '|<br>'. $this->_traverseFolder($row->guid, '', $level+1);
         }
         if (count($rowSet)) {
             return $sGuid . '</ul></li>';
         } else {
             return $sGuid . '</li>';
         }
     }
 }
开发者ID:psykomo,项目名称:kutump,代码行数:32,代码来源:Folder.php


示例17: modificarAction

 function modificarAction()
 {
     $this->view->subtitle = "Modificar Configuración";
     $configuracion = new Configuracion();
     if ($this->_request->isPost()) {
         Zend_Loader::loadClass('Zend_Filter_StripTags');
         $filter = new Zend_Filter_StripTags();
         $id = (int) $this->_request->getPost('id');
         $sitio_color_fondo = trim($filter->filter($this->_request->getPost('sitio_color_fondo')));
         $sitio_color_cabezal = trim($filter->filter($this->_request->getPost('sitio_color_cabezal')));
         $sitio_color_pie = trim($filter->filter($this->_request->getPost('sitio_color_pie')));
         if ($id !== false) {
             $data = array('sitio_color_fondo' => $sitio_color_fondo, 'sitio_color_cabezal' => $sitio_color_cabezal, 'sitio_color_pie' => $sitio_color_pie, 'id_sitio' => $this->session->sitio->id);
             $where = 'id = ' . $id;
             $configuracion->update($data, $where);
             $this->_redirect('/admin/configuracion/');
             return;
         }
     } else {
         $id = (int) $this->_request->getParam('id', 0);
         if ($id > 0) {
             $this->view->configuracion = Configuracion::getConfiguracionSitio($id);
         }
     }
     $this->view->action = "modificar";
     $this->view->buttonText = "Modificar";
     $this->view->scriptJs = "mooRainbow";
 }
开发者ID:anavarretev,项目名称:surforce-cms,代码行数:28,代码来源:ConfiguracionController.php


示例18: _setUpTestUtil

 /**
  * Get a TestUtil class for the current RDBMS brand.
  */
 protected function _setUpTestUtil()
 {
     $driver = $this->getDriver();
     $utilClass = "ZendX_Db_TestUtil_{$driver}";
     Zend_Loader::loadClass($utilClass);
     $this->_util = new $utilClass();
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:10,代码来源:TestSetup.php


示例19: getActions

 public static function getActions($filter = false, $module, $controller)
 {
     $controller = ucfirst($controller) . 'Controller.php';
     $loadFile = _BASE_PATH . 'application/modules/' . $module . '/controllers/' . $controller;
     if (Zend_Loader::isReadable($loadFile)) {
         /** @noinspection PhpIncludeInspection */
         include_once $loadFile;
     }
     if ($module == 'default') {
         $controller = substr($controller, 0, -4);
     } else {
         $controller = ucfirst($module) . '_' . substr($controller, 0, -4);
     }
     $res = array();
     try {
         $reflection = new ReflectionClass($controller);
         $methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
         foreach ($methods as $method) {
             $method = $method->name;
             if (false !== strpos($method, 'Action')) {
                 $name = str_replace('Action', '', $method);
                 $res[$name] = $name;
             }
         }
     } catch (ReflectionException $e) {
         //TODO $x = 1;
     }
     return $res;
 }
开发者ID:dafik,项目名称:dfi,代码行数:29,代码来源:Resource.php


示例20: setUp

 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     Zend_Loader::registerAutoload();
     // TODO Auto-generated UserServiceTest::setUp()
     $this->UserService = new App_UserService();
 }
开发者ID:tests1,项目名称:zendcasts,代码行数:10,代码来源:UserServiceTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Zend_Loader_Autoloader类代码示例发布时间:2022-05-23
下一篇:
PHP Zend_Ldap_Node_Schema类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap