Example #1
0
 function emailRecipient()
 {
     $self = $this;
     return (string) Event::result('user.recipient', $this, function ($result) use($self) {
         if (strpos($result, $self->email) === false) {
             return 'a string without the actual e-mail address';
         }
     });
 }
Example #2
0
 static function generateID()
 {
     return (int) Event::result('file.new.id', function ($id) {
         return (is_numeric($id) and $id) ? true : 'a non-integer or zero';
     });
 }
Example #3
0
 static function generatePassword()
 {
     return (string) Event::result('order.new.password', function ($password) {
         return strlen($password) < 1 ? 'a blank string' : true;
     });
 }