Varien_Filter_Template_Tokenizer_Abstract Class Reference

Inheritance diagram for Varien_Filter_Template_Tokenizer_Abstract:

Varien_Filter_Template_Tokenizer_Parameter Varien_Filter_Template_Tokenizer_Variable

List of all members.

Public Member Functions

 next ()
 prev ()
 char ()
 setString ($value)
 reset ()
 isWhiteSpace ()
 tokenize ()

Protected Attributes

 $_currentIndex
 $_string


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

char (  ) 

Return current char

Returns:
string

Definition at line 87 of file Abstract.php.

00088     {
00089         return $this->_string{$this->_currentIndex};
00090     }

isWhiteSpace (  ) 

Return true if current char is white-space

Returns:
boolean

Definition at line 115 of file Abstract.php.

00115                                    {
00116         return trim($this->char()) != $this->char();
00117     }

next (  ) 

Move current index to next char.

If index out of bounds returns false

Returns:
boolean

Definition at line 55 of file Abstract.php.

00056     {
00057         if($this->_currentIndex + 1 >= strlen($this->_string)) {
00058             return false;
00059         }
00060         
00061         $this->_currentIndex++;
00062         return true; 
00063     }

prev (  ) 

Move current index to previus char.

If index out of bounds returns false

Returns:
boolean

Definition at line 72 of file Abstract.php.

00073     {
00074         if($this->_currentIndex - 1 < 0) {
00075             return false;
00076         }
00077         
00078         $this->_currentIndex--;
00079         return true; 
00080     }

reset (  ) 

Move char index to begin of string

Definition at line 105 of file Abstract.php.

00106     {
00107         $this->_currentIndex = 0;
00108     }

setString ( value  ) 

Set string for tokenize

Definition at line 96 of file Abstract.php.

00097     {
00098         $this->_string = $value;
00099         $this->reset();
00100     }

tokenize (  )  [abstract]


Member Data Documentation

$_currentIndex [protected]

Definition at line 41 of file Abstract.php.

$_string [protected]

String for tokenize

Definition at line 46 of file Abstract.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:25:03 2009 for Magento by  doxygen 1.5.8