/**
  * [isValid description].
  *
  * @param [type] $key [description]
  *
  * @return bool [description]
  */
 public function isValid($key = null)
 {
     if (parent::isValid() && $this->getKey()) {
         return $key && $this->getKey() && $this->chiper->decrypt($this->getKey()) == $this->chiper->decrypt($key);
     }
     return false;
 }
Esempio n. 2
0
 /**
  * [isValid description].
  *
  * @param [type] $key [description]
  *
  * @return bool [description]
  */
 public function isValid($key = null)
 {
     if (parent::isValid()) {
         if ($key && parent::getKey() && parent::getKey() == $key) {
             return true;
         }
     }
     return false;
 }