Classes/Registry/SimpleRegistry.php
public function push(string $key, $data, bool $override = false)
    {
        if (!array_key_exists($key, $this->data) || $override) {
            $this->data[$key] = $data;

            return $this->data[$key];
        }

        return false;
    }
public function push(string $key, $data, bool $override = false)
    {
        if (!array_key_exists($key, $this->data) || $override) {
            $this->data[$key] = $data;

            return $this->data[$key];
        }

        return false;
    }
public function push ( string $ key , $ data , bool $ override = false ) { if ( ! array_key_exists ( $ key , $ this -> data ) || $ override ) { $ this -> data [ $ key ] = $ data ; return $ this -> data [ $ key ] ; } return false ; }
Pushs a value into the registry.

@param string $key      The registry key to store the value in
@param mixed  $data     The data to store
@param bool   $override (optional) Whether to override existing keys

@return mixed
Pushs a value into the registry .