Overview

Namespaces

  • Deimos
    • Flow
      • Extension
        • TBlock
        • TFor
        • TForeach
        • TIF
        • TLiteral
        • TPHP
        • TSimple
        • TTry
        • TWhile
      • Traits
  • PHP

Classes

  • Deimos\Flow\Block
  • Deimos\Flow\Configure
  • Deimos\Flow\DefaultConfig
  • Deimos\Flow\DefaultContainer
  • Deimos\Flow\Extension\TBlock\TBlockStart
  • Deimos\Flow\Extension\TBlock\TEndBlock
  • Deimos\Flow\Extension\TFor\TEndFor
  • Deimos\Flow\Extension\TFor\TFor
  • Deimos\Flow\Extension\TForeach\TElseForeach
  • Deimos\Flow\Extension\TForeach\TEndForeach
  • Deimos\Flow\Extension\TForeach\TForeach
  • Deimos\Flow\Extension\TIF\TELSE
  • Deimos\Flow\Extension\TIF\TELSEIF
  • Deimos\Flow\Extension\TIF\TEndIF
  • Deimos\Flow\Extension\TIF\TIF
  • Deimos\Flow\Extension\TLiteral\TLiteral
  • Deimos\Flow\Extension\TPHP\TEndPHP
  • Deimos\Flow\Extension\TPHP\TPHP
  • Deimos\Flow\Extension\TSimple\TAssign
  • Deimos\Flow\Extension\TSimple\TBreak
  • Deimos\Flow\Extension\TSimple\TContinue
  • Deimos\Flow\Extension\TSimple\TExtends
  • Deimos\Flow\Extension\TSimple\TInclude
  • Deimos\Flow\Extension\TSimple\TPartial
  • Deimos\Flow\Extension\TSimple\TVariable
  • Deimos\Flow\Extension\TTry\TCatch
  • Deimos\Flow\Extension\TTry\TEndTry
  • Deimos\Flow\Extension\TTry\TFinally
  • Deimos\Flow\Extension\TTry\TTry
  • Deimos\Flow\Extension\TWhile\TEndWhile
  • Deimos\Flow\Extension\TWhile\TWhile
  • Deimos\Flow\Flow
  • Deimos\Flow\FlowForeach
  • Deimos\Flow\FlowFunction
  • Deimos\Flow\ForeachState
  • Deimos\Flow\Lexer
  • Deimos\Flow\LexerConst
  • Deimos\Flow\Tokenizer

Interfaces

  • Throwable

Traits

  • Deimos\Flow\Traits\Block
  • Deimos\Flow\Traits\FileSystem
  • Deimos\Flow\Traits\Tokenizer

Exceptions

  • BadFunctionCallException
  • Exception
  • InvalidArgumentException
  • LogicException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: 
 3: namespace Deimos\Flow;
 4: 
 5: class FlowForeach
 6: {
 7: 
 8:     /**
 9:      * @var array
10:      */
11:     protected $state = [];
12: 
13:     /**
14:      * @param string $name
15:      * @param array  $storage
16:      */
17:     public function register($name, array $storage)
18:     {
19:         $this->state[$name] = new ForeachState($storage);
20:     }
21: 
22:     /**
23:      * @param string $name
24:      *
25:      * @return ForeachState
26:      */
27:     public function __get($name)
28:     {
29:         return $this->state[$name];
30:     }
31: 
32:     /**
33:      * @param string $name
34:      * @param array  $arguments
35:      *
36:      * @return mixed
37:      */
38:     public function __call($name, array $arguments)
39:     {
40:         return call_user_func_array($this->state[$name], $arguments);
41:     }
42: 
43:     /**
44:      * @param string $name
45:      * @param mixed  $value
46:      */
47:     public function __set($name, $value)
48:     {
49:         $this->register($name, $value);
50:     }
51: 
52:     /**
53:      * @param string $name
54:      *
55:      * @return bool
56:      */
57:     public function __isset($name)
58:     {
59:         return isset($this->state[$name]);
60:     }
61: 
62: }
API documentation generated by ApiGen