public function multiadd($name_vals, $prefix = null) { foreach ($name_vals as $name => $val) { $this->add("{$prefix}{$name}", $val); } }
/** * Merge content blocks for this instance with passed instance * * @param \Basecoat\View $view Instance to add content blocks to * @return Integer number of content blocks merged */ public function addToView($view) { $view->multiadd($this->blocks); return count($this->blocks); }