src/Helper/ArrayHelper.php
public static function pull($arr, $name, $type = null)
    {
        $ret = [];
        if ($type == self::GETTER) {
            $method = 'get' . $name;
            foreach ($arr as $elem) {
                $ret[] = $elem->$method();
            }
        } elseif ($type == self::OBJ) {
            foreach ($arr as $elem) {
                $ret[] = $elem->$name;
            }
        } else {
            foreach ($arr as $elem) {
                $ret[] = $elem[$name];
            }
        }
        return $ret;
    }
public static function pull($arr, $name, $type = null)
    {
        $ret = [];
        if ($type == self::GETTER) {
            $method = 'get' . $name;
            foreach ($arr as $elem) {
                $ret[] = $elem->$method();
            }
        } elseif ($type == self::OBJ) {
            foreach ($arr as $elem) {
                $ret[] = $elem->$name;
            }
        } else {
            foreach ($arr as $elem) {
                $ret[] = $elem[$name];
            }
        }
        return $ret;
    }
public static function pull ( $ arr , $ name , $ type = null ) { $ ret = [ ] ; if ( $ type == self :: GETTER ) { $ method = 'get' . $ name ; foreach ( $ arr as $ elem ) { $ ret [ ] = $ elem -> $ method ( ) ; } } elseif ( $ type == self :: OBJ ) { foreach ( $ arr as $ elem ) { $ ret [ ] = $ elem -> $ name ; } } else { foreach ( $ arr as $ elem ) { $ ret [ ] = $ elem [ $ name ] ; } } return $ ret ; }
Collects value from array

@param array $array
@param string $name
@param string $type
@return array
Collects value from array