Horde\ManageSieve::getActive PHP Method

getActive() public method

Returns the active script.
public getActive ( ) : string
return string The active scriptname.
    public function getActive()
    {
        if (is_array($scripts = $this->_cmdListScripts())) {
            return $scripts[1];
        }
    }

Usage Example

コード例 #1
0
ファイル: Timsieved.php プロジェクト: horde/horde
 /**
  * Returns the content of the currently active script.
  *
  * @return string  The complete ruleset of the specified user.
  * @throws Ingo_Exception
  * @throws Horde_Exception_NotFound
  */
 public function getScript()
 {
     $this->_connect();
     try {
         $active = $this->_sieve->getActive();
         if (!strlen($active)) {
             throw new Horde_Exception_NotFound();
         }
         return array('name' => $active, 'script' => $this->_sieve->getScript($active));
     } catch (ManageSieve\Exception $e) {
         throw new Ingo_Exception($e);
     }
 }
All Usage Examples Of Horde\ManageSieve::getActive