HosipLan

Untitled

Jan 16th, 2012
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1.  
  2.     const STATUS_PRESENT = 'present';
  3.     const STATUS_INSTALLED = 'installed';
  4.  
  5.     /**
  6.      * @param string $status
  7.      */
  8.     public function setStatus($status)
  9.     {
  10.         if (!defined('static::SOME_' . strtoupper($status))) {
  11.             throw new Kdyby\InvalidArgumentException('Invalid PackageVersion status "' . $status . '" was given.');
  12.         }
  13.  
  14.         $this->status = strtolower($status);
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment