a::getall PHP Method

getall() static public method

Gets all elements for an array of key
static public getall ( array $array, $keys ) : array
$array array The source array
return array An array of keys and matching values
    static function getall($array, $keys)
    {
        $result = array();
        foreach ($keys as $key) {
            $result[$key] = $array[$key];
        }
        return $result;
    }