private static function _resolveHasMany($attr, $value)
    {
        $cls = get_called_class();
        if (!self::hasHasMany($attr)) {
            return null;
        }

        $configs       = self::$_has_many[$cls][$attr];
        $has_many_cls  = self::hasManyClass($attr);
        $this_key      = self::hasManyForeignKey($attr);
        $collection    = $has_many_cls::where(array($this_key => $value));
        return $collection;
    }
private static function _resolveHasMany($attr, $value)
    {
        $cls = get_called_class();
        if (!self::hasHasMany($attr)) {
            return null;
        }

        $configs       = self::$_has_many[$cls][$attr];
        $has_many_cls  = self::hasManyClass($attr);
        $this_key      = self::hasManyForeignKey($attr);
        $collection    = $has_many_cls::where(array($this_key => $value));
        return $collection;
    }
private static function _resolveHasMany ( $ attr , $ value ) { $ cls = get_called_class ( ) ; if ( ! self :: hasHasMany ( $ attr ) ) { return null ; } $ configs = self :: $ _has_many [ $ cls ] [ $ attr ] ; $ has_many_cls = self :: hasManyClass ( $ attr ) ; $ this_key = self :: hasManyForeignKey ( $ attr ) ; $ collection = $ has_many_cls :: where ( array ( $ this_key => $ value ) ) ; return $ collection ; }
Resolve the has many association and returns the collection with values

@param string $attr  association name
@param mixed  $value of this object

@return collection
Resolve the has many association and returns the collection with values