src/Common/Service/View.php
public function setData($mKey, $mValue = null)
    {
        if (is_array($mKey)) {
            foreach ($mKey as $sKey => $mSubValue) {
                $this->setData($sKey, $mSubValue);
            }
        } elseif (is_string($mKey) || is_numeric($mKey)) {
            $this->aData[$mKey] = $mValue;
        } else {
            throw new NailsException('Key must be a string or a numeric');
        }

        return $this;
    }
public function setData($mKey, $mValue = null)
    {
        if (is_array($mKey)) {
            foreach ($mKey as $sKey => $mSubValue) {
                $this->setData($sKey, $mSubValue);
            }
        } elseif (is_string($mKey) || is_numeric($mKey)) {
            $this->aData[$mKey] = $mValue;
        } else {
            throw new NailsException('Key must be a string or a numeric');
        }

        return $this;
    }
public function setData ( $ mKey , $ mValue = null ) { if ( is_array ( $ mKey ) ) { foreach ( $ mKey as $ sKey => $ mSubValue ) { $ this -> setData ( $ sKey , $ mSubValue ) ; } } elseif ( is_string ( $ mKey ) || is_numeric ( $ mKey ) ) { $ this -> aData [ $ mKey ] = $ mValue ; } else { throw new NailsException ( 'Key must be a string or a numeric' ) ; } return $ this ; }
Add an item to the view data array, or update an existing item

@param string|array $mKey   The key, or keys (in a key value pair), to set
@param mixed        $mValue The value to set

@throws \Exception
@returns $this
Add an item to the view data array or update an existing item