generate() public method

Generates the scripts to do the filtering specified in the rules.
public generate ( ) : array
return array The scripts.
Exemplo n.º 1
0
 function _writeSieveScript()
 {
     $this->_setupStorage();
     $script = new Ingo_Script_Sieve(array('date_format' => '%x', 'time_format' => '%R', 'spam_compare' => 'string', 'spam_header' => 'X-Spam-Level', 'spam_char' => '*'));
     $this->sieve = tempnam('/tmp', 'sieve');
     $fh = fopen($this->sieve, 'w');
     $this->sieve_text = $script->generate();
     fwrite($fh, $this->sieve_text);
     fclose($fh);
 }