Flake\Core\Collection::__call PHP Méthode

__call() public méthode

public __call ( $sName, $aArguments )
    function &__call($sName, $aArguments)
    {
        if (strlen($sName) > 7 && $sName[0] === "s" && $sName[1] === "e" && $sName[2] === "t" && $sName[3] === "M" && $sName[4] === "e" && $sName[5] === "t" && $sName[6] === "a") {
            $sKey = strtolower(substr($sName, 7, 1)) . substr($sName, 8);
            $mValue =& $aArguments[0];
            if (is_null($mValue)) {
                if (array_key_exists($sKey, $this->aMeta)) {
                    unset($this->aMeta[$sKey]);
                }
            } else {
                $this->aMeta[$sKey] =& $mValue;
            }
            $res = null;
            return $res;
            # To avoid 'Notice: Only variable references should be returned by reference'
        } elseif (strlen($sName) > 7 && $sName[0] === "g" && $sName[1] === "e" && $sName[2] === "t" && $sName[3] === "M" && $sName[4] === "e" && $sName[5] === "t" && $sName[6] === "a") {
            $sKey = strtolower(substr($sName, 7, 1)) . substr($sName, 8);
            if (array_key_exists($sKey, $this->aMeta)) {
                return $this->aMeta[$sKey];
            } else {
                return null;
            }
        } else {
            throw new \Exception("Method " . $sName . "() not found on " . get_class($this));
        }
    }