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


PHP CakePlugin::path方法代碼示例

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


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

示例1: testParse

 public function testParse()
 {
     $path = CakePlugin::path('Translations') . 'Test/Files/simple.plist';
     $result = PlistParser::parse($path);
     $expected = array('count' => 1, 'translations' => array(array('locale' => 'en', 'domain' => 'default', 'category' => 'LC_MESSAGES', 'key' => 'foo', 'value' => 'foo value')));
     $this->assertSame($expected, $result);
 }
開發者ID:nodesagency,項目名稱:Translations,代碼行數:7,代碼來源:PlistParserTest.php

示例2: suite

 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All Bs3Helpers tests');
     $path = CakePlugin::path('Bs3Helpers') . 'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper' . DS;
     $suite->addTestDirectory($path);
     return $suite;
 }
開發者ID:Cakephp-Italia,項目名稱:cakephp-bootstrap3-helpers,代碼行數:12,代碼來源:AllTestsTest.php

示例3: testImageFromBlob

 /**
  * HtmlExtHelperTest::testImageFromBlob()
  *
  * @return void
  */
 public function testImageFromBlob()
 {
     $folder = CakePlugin::path('Tools') . 'Test' . DS . 'test_files' . DS . 'img' . DS;
     $content = file_get_contents($folder . 'hotel.png');
     $is = $this->Html->imageFromBlob($content);
     $this->assertTrue(!empty($is));
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:12,代碼來源:HtmlExtHelperTest.php

示例4: _configTestFile

 protected function _configTestFile($path = null, $baseKey = null)
 {
     if ($path === null) {
         $path = CakePlugin::path('YamlReader') . 'Test' . DS . 'files' . DS;
     }
     Configure::config('YamlTestConfig', new YamlReader($path, $baseKey));
 }
開發者ID:hiromi2424,項目名稱:yaml_reader,代碼行數:7,代碼來源:YamlReaderTest.php

示例5: setUp

 public function setUp()
 {
     $this->FileManager = new FileManager(false, null, null, null);
     $this->__testAppPath = CakePlugin::path('FileManager') . 'Test' . DS . 'test_app' . DS;
     $this->__setFilePathsForTests();
     parent::setUp();
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:7,代碼來源:FileManagerTest.php

示例6: _basePath

 /**
  * Generates the base path to a set of tests based on the parameters.
  *
  * @param array $params
  * @return string The base path.
  */
 protected static function _basePath($params)
 {
     $result = null;
     if (!empty($params['core'])) {
         $result = CORE_TEST_CASES;
         // CUSTOMIZE ADD 2014/07/02 ryuring
         // >>>
     } elseif ($params['baser']) {
         $result = BASER_TEST_CASES;
         // <<<
     } elseif (!empty($params['plugin'])) {
         if (!CakePlugin::loaded($params['plugin'])) {
             try {
                 CakePlugin::load($params['plugin']);
                 $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
             } catch (MissingPluginException $e) {
             }
         } else {
             $result = CakePlugin::path($params['plugin']) . 'Test' . DS . 'Case';
         }
     } elseif (!empty($params['app'])) {
         $result = APP_TEST_CASES;
     }
     return $result;
 }
開發者ID:baserproject,項目名稱:basercms,代碼行數:31,代碼來源:BaserTestLoader.php

示例7: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('OAuth Tests');
     $path = CakePlugin::path('OAuth') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectory($path . 'Model' . DS . 'Behavior');
     return $suite;
 }
開發者ID:thomseddon,項目名稱:cakephp-oauth-server,代碼行數:7,代碼來源:AllOAuthTestsTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     App::build(['Model' => [CakePlugin::path('Tools') . 'Test' . DS . 'test_app' . DS . 'Model' . DS]], App::RESET);
     $this->Comment = ClassRegistry::init('BitmaskedComment');
     $this->Comment->Behaviors->load('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }
開發者ID:ByMyHandsOnly,項目名稱:BMHO_Web,代碼行數:7,代碼來源:BitmaskedBehaviorTest.php

示例9: suite

 /**
  * Suite define the tests for this suite
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All Datasources test');
     $path = CakePlugin::path('InlineCss') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectoryRecursive($path);
     return $suite;
 }
開發者ID:drmonkeyninja,項目名稱:cakephp-inline-css,代碼行數:12,代碼來源:AllInlineCssTest.php

示例10: init

 /**
  * Initialization.
  *
  * It loads the required classes for web and cli environments.
  *
  * @throws ConfigureException if needed configuration parameters are not found.
  * @param array $config Configuration options.
  * @return void
  */
 public static function init($config = null)
 {
     self::loadConfig($config);
     if (!($redis = Configure::read('CakeResque.Redis')) || !($resqueLib = Configure::read('CakeResque.Resque.lib')) || !($schedulerLib = Configure::read('CakeResque.Scheduler.lib')) || !($statusLib = Configure::read('CakeResque.Status.lib'))) {
         throw new ConfigureException(__d('cake_resque', 'There is an error in the configuration file.'));
     }
     if (empty($redis['host']) || empty($redis['port']) || empty($redis['database']) && !is_numeric($redis['database']) || empty($redis['namespace'])) {
         throw new ConfigureException(__d('cake_resque', 'There is an error in the Redis configuration key.'));
     }
     $pluginVendorPath = CakePlugin::path('CakeResque') . 'vendor' . DS;
     if (!Folder::isAbsolute($resqueLib)) {
         $resqueLib = $pluginVendorPath . $resqueLib;
     }
     $resqueLib .= DS . 'lib' . DS;
     if (!Folder::isAbsolute($schedulerLib)) {
         $schedulerLib = $pluginVendorPath . $schedulerLib;
     }
     $schedulerLib .= DS . 'lib' . DS . 'ResqueScheduler' . DS;
     if (!Folder::isAbsolute($statusLib)) {
         $statusLib = $pluginVendorPath . $statusLib;
     }
     require_once realpath($resqueLib . 'Resque.php');
     require_once realpath($resqueLib . 'Resque' . DS . 'Worker.php');
     require_once realpath($schedulerLib . 'ResqueScheduler.php');
     require_once realpath($schedulerLib . 'Stat.php');
     require_once realpath($schedulerLib . 'Job' . DS . 'Status.php');
     require_once realpath($statusLib . DS . 'src' . DS . 'ResqueStatus' . DS . 'ResqueStatus.php');
     Resque::setBackend($redis['host'] . ':' . $redis['port'], $redis['database'], $redis['namespace']);
 }
開發者ID:rchavik,項目名稱:Cake-Resque,代碼行數:38,代碼來源:CakeResque.php

示例11: suite

 /**
  * Suite define the tests for this plugin
  *
  * @return void
  */
 public static function suite()
 {
     $suite = new CakeTestSuite('All VatNumberCheck test');
     $path = CakePlugin::path('VatNumberCheck') . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectoryRecursive($path);
     return $suite;
 }
開發者ID:oefenweb,項目名稱:cakephp-vat-number-check,代碼行數:12,代碼來源:AllVatNumberCheckTest.php

示例12: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('All Extensions plugin tests');
     $path = CakePlugin::path('Extensions') . DS . 'Test' . DS . 'Case' . DS;
     $suite->addTestDirectory($path . 'Lib');
     return $suite;
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:7,代碼來源:AllExtensionsTestsTest.php

示例13: setUp

 /**
  * setUp method
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(CakePlugin::path('Migrations') . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), APP::RESET);
     $this->connection = 'test';
     $this->Migrations = new Migrations($this->connection);
 }
開發者ID:frankfoerster,項目名稱:cakephp-migrations,代碼行數:10,代碼來源:MigrationsTest.php

示例14: getAssetFile

 /**
  * Builds asset file path based off url
  *
  * @param string $url
  * @return string Absolute path for asset file
  */
 static function getAssetFile($url)
 {
     $parts = explode('/', $url);
     if ($parts[0] === 'theme') {
         $file = '';
         $fileFragments = explode(',', $url);
         $fileNumber = count($fileFragments);
         foreach ($fileFragments as $k => $fileFragment) {
             $fileParts = explode('/', $fileFragment);
             unset($fileParts[0], $fileParts[1]);
             if ($fileNumber == $k + 1) {
                 $file .= urldecode(implode(DS, $fileParts));
             } else {
                 $file .= urldecode(implode(DS, $fileParts)) . ',';
             }
         }
         $themeName = $parts[1];
         $path = Configure::read('App.www_root') . 'theme' . DS . $themeName;
         if (!file_exists($path)) {
             $path = App::themePath($themeName) . 'webroot';
         }
         return array($path, $file);
     }
     $plugin = Inflector::camelize($parts[0]);
     if (CakePlugin::loaded($plugin)) {
         unset($parts[0]);
         $fileFragment = urldecode(implode(DS, $parts));
         $pluginWebroot = CakePlugin::path($plugin) . 'webroot';
         return array($pluginWebroot, $fileFragment);
     } else {
         return array(WWW_ROOT, $_GET['f']);
     }
 }
開發者ID:vijaychirivolu,項目名稱:aW5zdGl0dXRlcyajiv,代碼行數:39,代碼來源:Asset.php

示例15: suite

 public static function suite()
 {
     $suite = new CakeTestSuite('All Acl component class tests');
     $path = CakePlugin::path('Acl') . DS . 'Test' . DS . 'Case';
     $suite->addTestDirectory($path . DS . 'Controller' . DS . 'Component');
     return $suite;
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:7,代碼來源:AllAclComponentsTest.php


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