Storm\Core\Object\UnitOfWork::Execute PHP Method

Execute() public method

Add a procedure to be executed.
public Execute ( Storm\Core\Object\IProcedure $Procedure ) : void
$Procedure Storm\Core\Object\IProcedure The procedure to execute
return void
    public function Execute(IProcedure $Procedure)
    {
        if (!$this->Domain->HasEntityMap($Procedure->GetEntityType())) {
            throw $this->TypeMismatch('procedure', $Procedure->GetEntityType());
        }
        $this->ProcedureToExecute[] = $Procedure;
    }

Usage Example

Esempio n. 1
0
 /**
  * @expectedException \Storm\Core\Object\ObjectException
  */
 public function testUnmappedProcedureIsDisallowed()
 {
     $Procedure = $this->getMock(self::CoreObjectNamespace . 'IProcedure');
     $Procedure->expects($this->any())->method('GetEntityType')->will($this->returnValue(__CLASS__));
     $this->UnitOfWork->Execute($Procedure);
 }
All Usage Examples Of Storm\Core\Object\UnitOfWork::Execute