public static function hasMany($attr, $options=null)
    {
        $cls = get_called_class();

        if (!array_key_exists($cls, self::$_has_many)) {
            self::$_has_many[$cls] = array();
        }

        self::$_has_many[$cls][$attr] = $options ? $options : false;

        $klass = self::hasManyClass($attr);
        $ids   = strtolower($klass)."_ids";
        self::$_has_many_maps[$cls][$ids] = $attr;
    }
public static function hasMany($attr, $options=null)
    {
        $cls = get_called_class();

        if (!array_key_exists($cls, self::$_has_many)) {
            self::$_has_many[$cls] = array();
        }

        self::$_has_many[$cls][$attr] = $options ? $options : false;

        $klass = self::hasManyClass($attr);
        $ids   = strtolower($klass)."_ids";
        self::$_has_many_maps[$cls][$ids] = $attr;
    }
public static function hasMany ( $ attr , $ options = null ) { $ cls = get_called_class ( ) ; if ( ! array_key_exists ( $ cls , self :: $ _has_many ) ) { self :: $ _has_many [ $ cls ] = array ( ) ; } self :: $ _has_many [ $ cls ] [ $ attr ] = $ options ? $ options : false ; $ klass = self :: hasManyClass ( $ attr ) ; $ ids = strtolower ( $ klass ) . "_ids" ; self :: $ _has_many_maps [ $ cls ] [ $ ids ] = $ attr ; }
Create a has many relationship

@param string $attr    attribute
@param mixed  $options to use

@return null
Create a has many relationship