openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

DslThrow.class.php (463B)


      1 <?php
      2 
      3 namespace dsl\ast;
      4 
      5 use dsl\DslRuntimeException;
      6 
      7 class DslThrow implements DslStatement
      8 {
      9 	private $value;
     10 
     11 	public function __construct( $expressionTokens )
     12 	{
     13 		$this->value = new DslExpression( $expressionTokens );
     14 	}
     15 
     16     /**
     17      * @throws DslRuntimeException
     18      */
     19     public function execute(& $context ) {
     20 
     21 	    $value = $this->value->execute( $context );
     22 	    throw new DslRuntimeException( $value );
     23 	}
     24 
     25 	public function parse($tokens)
     26 	{
     27 	}
     28 }