Esempio n. 1
0
 public function Dispatch(Dill_Dispatcher_Message $Message)
 {
     if (strpos($Message->GetName(), 'Get') !== 0) {
         return false;
     }
     $PropertyName = substr($Message->GetName(), 3);
     if (empty($PropertyName)) {
         return false;
     }
     if ($this->PropertiesPlugin->IssetValue($PropertyName)) {
         return false;
     }
     if (empty($this->Config[$PropertyName])) {
         return false;
     }
     $ClassName = $this->Config[$PropertyName];
     $this->CreateLinkedObject($PropertyName, $ClassName);
     return true;
 }
Esempio n. 2
0
 public function Dispatch(Dill_Dispatcher_Message $Message)
 {
     $this->Caller = $Message->GetCaller();
     $MessageName = $Message->GetName();
     if (strpos($MessageName, 'Get') === 0) {
         $Output = $this->GetValue(substr($MessageName, 3));
     } elseif (strpos($MessageName, 'Set') === 0) {
         $Output = $this->SetValue(substr($MessageName, 3), reset($Message->GetArguments()));
     } elseif (strpos($MessageName, 'Unset') === 0) {
         $Output = $this->UnsetValue(substr($MessageName, 5));
     } elseif (strpos($MessageName, 'Isset') === 0) {
         $Output = $this->IssetValue(substr($MessageName, 5));
     } elseif (strpos($MessageName, 'HasProperty') === 0) {
         $Output = $this->HasProperty(reset($Message->GetArguments()));
     } else {
         return false;
     }
     $Message->SetOutput($Output);
 }
Esempio n. 3
0
 public function Dispatch(Dill_Dispatcher_Message $Message)
 {
     $Message->SetOutput('Plugin2 output');
     $this->DispatchCalled = $Message;
     return true;
 }