Returns new object.
public add ( array | string | object $class, array | string $options = null, string $template_spot = null, array | string $template_branch = null ) : AbstractObject | ||
$class | array | string | object | Name of the new class. Can also be array with 0=>name and rest of array will be considered as $options or object. |
$options | array | string | Short name or array of properties. 0=>name will be used as a short-name or your object. |
$template_spot | string | Tag where output will appear |
$template_branch | array | string | Redefine template |
return | AbstractObject |
/** * Creates one more instance of $this object. * * @param array $properties Set initial properties for new object * * @return self */ public function newInstance($properties = null) { return $this->owner->add(get_class($this), $properties); }