Stack Library



( ZN >= 3.0.0 )

The Stack is derived from the Strings library of the ZN Framework  and allows you to apply the methods of this library to a common library multiple times. It is ideal especially when more than one string method is used for a data.

 

# Methods


this data ( String $ data )
Mixed get ( Void )

 

# Data ( ZN >= 3.0.0 )


The array to be processed is specified. This method should be specified immediately after Stack :: .  It should be used as the top ring of the chain.

Parameters

String $ data Relevant string.
return this

Use of

$data = Stack::data('bar foo baz')
             ->upperCase()
             ->replace('BAZ', 'COO')
             ->get();

\Output::writeLine($data);
BAR FOO COO 

 

# Get ( ZN >= 3.0.0 )


Used to get the result of the operation.

Warning: This method should be used as the final method.

Parameters

void
return Mixed

Use of

$data = Stack::data('bar foo baz')
             ->upperCase()
             ->replace('BAZ', 'COO')
             ->get();

\Output::writeLine($data);
BAR FOO COO