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


PHP static::key方法代碼示例

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


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

示例1: getKey

 /**
  * Get the key for hashing
  * 
  * @return string
  */
 private static function getKey()
 {
     if (static::$key === null) {
         static::$key = Application::getConfig('application', 'key');
     }
     return static::$key;
 }
開發者ID:nkammah,項目名稱:Crash-Analytics,代碼行數:12,代碼來源:Cookie.php

示例2: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     // make completely random key/bucket based on time
     static::$key = md5(rand(0, 99) . time());
     static::$bucket = md5(rand(0, 99) . time());
 }
開發者ID:basho,項目名稱:riak-php-client,代碼行數:7,代碼來源:SecondaryIndexOperationsTest.php

示例3: key

 /**
  * Get the Datastore key, as stored in the datastore configuration file.
  *
  * @return   string           Returns the datastore key
  */
 public static function key()
 {
     if (static::$key === false) {
         static::$key = Config::get('datastore.key');
     }
     return static::$key;
 }
開發者ID:nerdsrescueme,項目名稱:Core,代碼行數:12,代碼來源:datastore.php

示例4: getKey

 protected static function getKey()
 {
     if (!static::$key) {
         static::$key = static::$cachePrefix . '_' . static::getClientIp();
     }
     return static::$key;
 }
開發者ID:mehulsbhatt,項目名稱:MindaPHP,代碼行數:7,代碼來源:Firewall.php

示例5: init

 public static function init()
 {
     if (!ctype_xdigit(Config::get('encryption.cipher'))) {
         throw new Exception('Change your cipher code in app/config/encryption.php file!');
     }
     static::$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
     static::$key = pack('H*', Config::get('encryption.cipher'));
 }
開發者ID:ramee,項目名稱:alien-framework,代碼行數:8,代碼來源:Encryption.php

示例6: __initialize

 /**
  * Magic method called when a class is first encountered by the Autoloader,
  * providing static initialization.
  *
  * @return   void             No value is returned
  */
 public static function __initialize()
 {
     if ((static::$key = Config::get('crypt.key')) == '') {
         throw new \Exception('The Crypt class cannot be used without providing a shared key. Please specify on in your crypt configuration file');
     }
     static::$defaultDriver = Config::get('crypt.driver', 'xcrypt');
     static::$hasher = Config::get('crypt.hasher', 'sha1');
     static::$key = md5(static::$key);
 }
開發者ID:nerdsrescueme,項目名稱:Core,代碼行數:15,代碼來源:crypt.php

示例7: __construct

 /**
  * Constructor.
  *
  * @access  protected
  */
 protected function __construct()
 {
     // Set current time
     static::$now = time();
     // Cache key allows us to invalidate all cache on configuration changes.
     static::$key = (Config::get('system.cache.prefix') ? Config::get('system.cache.prefix') : 'fansoro') . '-' . md5(ROOT_DIR . Fansoro::VERSION);
     // Get Cache Driver
     static::$driver = static::getCacheDriver();
     // Set the cache namespace to our unique key
     static::$driver->setNamespace(static::$key);
 }
開發者ID:cv0,項目名稱:fansoro,代碼行數:16,代碼來源:Cache.php

示例8: setUp

 /**
  * Sets up the fixture.
  *
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     if (empty(static::$object)) {
         $this->markTestSkipped('There is no caching engine.');
     }
     $key = md5(date(DATE_RFC2822));
     $value = 'Test value';
     static::$key = $key;
     static::$value = $value;
     static::$sessionName = 'SessionName';
     static::$sessionPath = 'SessionPath';
     static::$className = get_class(static::$object);
     parent::setUp();
 }
開發者ID:ZerGabriel,項目名稱:joomla-framework,代碼行數:23,代碼來源:StorageCase.php

示例9: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     // make completely random key based on time
     static::$key = md5(rand(0, 99) . time());
     try {
         // Skip this suite if the "hlls" bucket type is not present
         $command = (new Command\Builder\FetchBucketProperties(static::$riak))->buildBucket('test', static::HLL_BUCKET_TYPE)->build();
         $response = $command->execute();
         if (!$response->isSuccess() || $response->getCode() != 200) {
             throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping");
         }
     } catch (\Exception $ex) {
         throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping");
     }
 }
開發者ID:basho,項目名稱:riak-php-client,代碼行數:16,代碼來源:HllOperationsTest.php

示例10: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     // make completely random key based on time
     static::$key = md5(rand(0, 99) . time());
 }
開發者ID:jjulien,項目名稱:riak-php-client,代碼行數:5,代碼來源:CounterOperationsTest.php

示例11: update

 /**
  * Update a model instance in the database.
  *
  * @param  mixed  $id
  * @param  array  $attributes
  * @return int
  */
 public static function update($id, $attributes)
 {
     $model = new static(array(), true);
     if (static::$timestamps) {
         $attributes['updated_at'] = new \DateTime();
     }
     return $model->query()->where($model->key(), '=', $id)->update($attributes);
 }
開發者ID:perryhau,項目名稱:Laravel-1,代碼行數:15,代碼來源:model.php

示例12: setkey

 /**
  * setKey modifie la clé de cryptage
  *
  * @param string $key
  */
 public static function setkey($key)
 {
     static::$key = $key;
 }
開發者ID:papac,項目名稱:framework,代碼行數:9,代碼來源:Security.php

示例13: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     static::$response_data = null;
     static::$key = null;
 }
開發者ID:aenglander,項目名稱:launchkey-wordpress,代碼行數:5,代碼來源:class-launchkey-wp-saml2-response-service-test.php

示例14: listing

 /**
  * Retrieve key => value pairs using `id` for keys and the given attribute
  * for values.
  * 
  * @param string $attribute
  * @param array  $filter    [optional]
  * @param array  $order     [optional]
  * @param int    $limit     [optional]
  * @param int    $offset    [optional]
  * @return array
  */
 public static function listing($attribute, $filter = array(), $order = array(), $limit = null, $offset = 0)
 {
     $instance = new static();
     $storage = $instance->storage();
     $data = $storage->listing($instance->table(), array($instance->key(), $attribute), $filter, $order, $limit, $offset);
     return static::prepareListing($data, $attribute);
 }
開發者ID:darya,項目名稱:framework,代碼行數:18,代碼來源:Record.php

示例15: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     static::$key = null;
 }
開發者ID:aenglander,項目名稱:launchkey-wordpress,代碼行數:4,代碼來源:class-launchkey-wp-saml2-request-service-test.php


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