当前位置: 首页>>代码示例>>PHP>>正文


PHP Storage::remove方法代码示例

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


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

示例1: testCanUnsetAVariable

 public function testCanUnsetAVariable()
 {
     $this->namespace->testUnset = 5;
     $this->assertEquals(5, $this->storage->get('testUnset'));
     $this->storage->remove('testUnset');
     $this->assertFalse(isset($this->namespace->testUnset));
     $this->assertFalse($this->storage->has('testUnset'));
 }
开发者ID:deltasystems,项目名称:dewdrop,代码行数:8,代码来源:StorageTest.php

示例2: validate

 /**
  * validate
  *
  * Run validation process
  *
  * @return null
  */
 public function validate()
 {
     parent::validate();
     // compare protection code
     if (property_exists($this->_data, 'protection_code')) {
         $protectionCode = \Storage::read('protection-code-register');
         \Storage::remove('protection-code-register');
         if ($this->_data->protection_code !== $protectionCode) {
             $this->addMessage('protection_code', \View::$language->register_form_protection_code_invalid);
         }
     }
     // compare password confirmation
     if (property_exists($this->_data, 'password') && property_exists($this->_data, 'confirm_password') && $this->_data->password !== $this->_data->confirm_password) {
         $this->addMessage('confirm_password', \View::$language->register_form_password_confirm_mismatch);
     }
     // check for existence
     if ($this->isValid()) {
         $checkedFields = array('email', 'login');
         $UserModel = \App::getInstance('common\\UserModel');
         foreach ($checkedFields as $fName) {
             if ($UserModel->isExists($fName, $this->_data->{$fName})) {
                 $mKey = 'register_form_' . $fName . '_is_exists';
                 $this->addMessage($fName, \View::$language->{$mKey});
             }
         }
     }
 }
开发者ID:nsedenkov,项目名称:phpsu,代码行数:34,代码来源:RegisterForm.php

示例3: testBase

 /**
  * Base testing
  */
 public function testBase()
 {
     $storage = new Storage();
     $alphabet = new Alphabet('en', array(), array(), array());
     $storage->add($alphabet);
     $this->assertEquals($alphabet, $storage->get('en'));
     $this->assertEquals(array('en' => $alphabet), $storage->all());
     $storage->remove($alphabet);
     $this->assertNull($storage->get('en'));
 }
开发者ID:jackblackjack,项目名称:LanguageDetector,代码行数:13,代码来源:StorageTest.php

示例4: rollback

 /**
  * rollback
  */
 public function rollback()
 {
     $this->storage->remove($this->uri, $this->options);
     if (is_null($this->previous)) {
         $this->storage->remove($this->uri);
     } else {
         $this->storage->put($this->previous, $this->uri, $this->options);
     }
     $this->clean();
     $this->initialize();
 }
开发者ID:mychaelstyle,项目名称:php-utils,代码行数:14,代码来源:File.php

示例5: testRemove

 /**
  * @covers mychaelstyle\Storage::remove
  * @covers mychaelstyle\Storage::get
  * @covers mychaelstyle\Storage::put
  * @depends testGet
  */
 public function testRemove()
 {
     $def1 = $this->dsnMap['Local'];
     $def2 = $this->dsnMap['Local2'];
     $this->object->addProvider($def2['dsn'], $def2['options']);
     // remove file
     $this->object->remove($this->uri_example);
     // assertLocalDeleted
     $this->assertLocalDeleted($def1['dsn'], $this->uri_example);
     $this->assertLocalDeleted($def2['dsn'], $this->uri_example);
 }
开发者ID:mychaelstyle,项目名称:php-utils,代码行数:17,代码来源:StorageTest.php

示例6: validate

 /**
  * validate
  *
  * Run validation process
  *
  * @return null
  */
 public function validate()
 {
     parent::validate();
     // compare protection code
     if (property_exists($this->_data, 'protection_code')) {
         $protectionCode = \Storage::read('protection-code-sign-in');
         \Storage::remove('protection-code-sign-in');
         if ($this->_data->protection_code !== $protectionCode) {
             $this->addMessage('protection_code', \View::$language->sign_in_form_protection_code_invalid);
         }
     }
     // remove sign in counter data
     if ($this->isValid()) {
         \Storage::remove('sign-in-tries');
     }
 }
开发者ID:nsedenkov,项目名称:phpsu,代码行数:23,代码来源:SignInForm.php

示例7: tearDown

 protected function tearDown()
 {
     $this->storage->remove();
 }
开发者ID:thornberger,项目名称:empire,代码行数:4,代码来源:SecretsRepositoryTest.php


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