Horde\ManageSieve::getScript PHP Method

getScript() public method

Retrieves a script.
public getScript ( string $scriptname ) : string
$scriptname string The name of the script to be retrieved.
return string The script.
    public function getScript($scriptname)
    {
        return $this->_cmdGetScript($scriptname);
    }

Usage Example

Esempio n. 1
0
 /**
  * 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::getScript