本文整理汇总了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;
}
示例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());
}
示例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;
}
示例4: getKey
protected static function getKey()
{
if (!static::$key) {
static::$key = static::$cachePrefix . '_' . static::getClientIp();
}
return static::$key;
}
示例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'));
}
示例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);
}
示例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);
}
示例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();
}
示例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");
}
}
示例10: setUpBeforeClass
public static function setUpBeforeClass()
{
// make completely random key based on time
static::$key = md5(rand(0, 99) . time());
}
示例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);
}
示例12: setkey
/**
* setKey modifie la clé de cryptage
*
* @param string $key
*/
public static function setkey($key)
{
static::$key = $key;
}
示例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);
}
示例15: tearDownAfterClass
public static function tearDownAfterClass()
{
static::$key = null;
}
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:4,代码来源:class-launchkey-wp-saml2-request-service-test.php