当前位置: 首页>>代码示例>>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;未经允许,请勿转载。