Show
Ignore:
Timestamp:
01/01/07 19:42:27 (2 years ago)
Author:
david
Message:

work in progress: new execution flow, action stack is gone, decoration doesn't require special abilities of the renderer anymore, but still needs further abstraction. decorators in decorators (for slots) should work now, and slots are available in the main content template. also, caching for execution filter is in place, albeit not enabled/complete yet. refs #373, #377, #287 and #290

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/david-execution_flow/src/action/AgaviAction.class.php

    r1408 r1448  
    2929 * @version    $Id$ 
    3030 */ 
    31 abstract class AgaviAction extends AgaviAttributeHolder 
     31abstract class AgaviAction 
    3232{ 
    3333  /** 
    3434   * @var        AgaviContext An AgaviContext instance. 
    3535   */ 
     36  private $container = null; 
     37 
     38  /** 
     39   * @var        AgaviContext An AgaviContext instance. 
     40   */ 
    3641  private $context = null; 
    3742 
     
    4752  { 
    4853    return $this->context; 
     54  } 
     55 
     56  public final function getContainer() 
     57  { 
     58    return $this->container; 
    4959  } 
    5060 
     
    91101   * @since      0.9.0 
    92102   */ 
    93   public function initialize(AgaviContext $context) 
    94   { 
    95     $this->context = $context; 
     103  public function initialize(AgaviExecutionContainer $container) 
     104  { 
     105    $this->container = $container; 
     106     
     107    $this->context = $container->getContext(); 
    96108  } 
    97109 
     
    148160    return 'Input'; 
    149161  } 
     162 
     163  /** 
     164   * @see        AgaviAttributeHolder::setAttributesByRef() 
     165   * 
     166   * @author     David Zuelke <dz@bitxtender.com> 
     167   * @since      0.9.0 
     168   */ 
     169  public function clearAttributes() 
     170  { 
     171    $this->container->clearAttributes(); 
     172  } 
     173 
     174  /** 
     175   * @see        AgaviAttributeHolder::setAttributesByRef() 
     176   * 
     177   * @author     David Zuelke <dz@bitxtender.com> 
     178   * @since      0.9.0 
     179   */ 
     180  public function & getAttribute($name, $default = null) 
     181  { 
     182    return $this->container->getAttribute($name, null, $default); 
     183  } 
     184 
     185  /** 
     186   * @see        AgaviAttributeHolder::setAttributesByRef() 
     187   * 
     188   * @author     David Zuelke <dz@bitxtender.com> 
     189   * @since      0.9.0 
     190   */ 
     191  public function getAttributeNames() 
     192  { 
     193    return $this->container->getAttributeNames(); 
     194  } 
     195 
     196  /** 
     197   * @see        AgaviAttributeHolder::setAttributesByRef() 
     198   * 
     199   * @author     David Zuelke <dz@bitxtender.com> 
     200   * @since      0.11.0 
     201   */ 
     202  public function & getAttributes() 
     203  { 
     204    return $this->container->getAttributes(); 
     205  } 
     206 
     207  /** 
     208   * @see        AgaviAttributeHolder::setAttributesByRef() 
     209   * 
     210   * @author     David Zuelke <dz@bitxtender.com> 
     211   * @since      0.9.0 
     212   */ 
     213  public function hasAttribute($name) 
     214  { 
     215    return $this->container->hasAttribute($name); 
     216  } 
     217 
     218  /** 
     219   * @see        AgaviAttributeHolder::setAttributesByRef() 
     220   * 
     221   * @author     David Zuelke <dz@bitxtender.com> 
     222   * @since      0.9.0 
     223   */ 
     224  public function & removeAttribute($name) 
     225  { 
     226    return $this->container->removeAttribute($name); 
     227  } 
     228   
     229  /** 
     230   * @see        AgaviAttributeHolder::setAttributesByRef() 
     231   * 
     232   * @author     David Zuelke <dz@bitxtender.com> 
     233   * @since      0.9.0 
     234   */ 
     235  public function setAttribute($name, $value) 
     236  { 
     237    $this->container->setAttribute($name, $value); 
     238  } 
     239 
     240  /** 
     241   * @see        AgaviAttributeHolder::setAttributesByRef() 
     242   * 
     243   * @author     David Zuelke <dz@bitxtender.com> 
     244   * @since      0.10.0 
     245   */ 
     246  public function appendAttribute($name, $value) 
     247  { 
     248    $this->container->appendAttribute($name, $value); 
     249  } 
     250 
     251  /** 
     252   * @see        AgaviAttributeHolder::setAttributesByRef() 
     253   * 
     254   * @author     David Zuelke <dz@bitxtender.com> 
     255   * @since      0.9.0 
     256   */ 
     257  public function setAttributeByRef($name, &$value) 
     258  { 
     259    $this->container->setAttributeByRef($name, $value); 
     260  } 
     261 
     262  /** 
     263   * @see        AgaviAttributeHolder::setAttributesByRef() 
     264   * 
     265   * @author     David Zuelke <dz@bitxtender.com> 
     266   * @since      0.10.0 
     267   */ 
     268  public function appendAttributeByRef($name, &$value) 
     269  { 
     270    $this->container->appendAttributeByRef($name, $value); 
     271  } 
     272 
     273  /** 
     274   * @see        AgaviAttributeHolder::setAttributesByRef() 
     275   * 
     276   * @author     David Zuelke <dz@bitxtender.com> 
     277   * @since      0.9.0 
     278   */ 
     279  public function setAttributes(array $attributes) 
     280  { 
     281    $this->container->setAttributes($attributes); 
     282  } 
     283 
     284  /** 
     285   * @see        AgaviAttributeHolder::setAttributesByRef() 
     286   * 
     287   * @author     David Zuelke <dz@bitxtender.com> 
     288   * @since      0.9.0 
     289   */ 
     290  public function setAttributesByRef(array &$attributes) 
     291  { 
     292    $this->container->setAttributesByRef($attributes); 
     293  } 
    150294} 
    151295