public static function hasOne($attr, $options=null)
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_has_one)) {
            self::$_has_one[$cls] = array();
        }
        self::$_has_one[$cls][$attr] = $options ? $options : false;
    }
public static function hasOne($attr, $options=null)
    {
        $cls = get_called_class();
        if (!array_key_exists($cls, self::$_has_one)) {
            self::$_has_one[$cls] = array();
        }
        self::$_has_one[$cls][$attr] = $options ? $options : false;
    }
public static function hasOne ( $ attr , $ options = null ) { $ cls = get_called_class ( ) ; if ( ! array_key_exists ( $ cls , self :: $ _has_one ) ) { self :: $ _has_one [ $ cls ] = array ( ) ; } self :: $ _has_one [ $ cls ] [ $ attr ] = $ options ? $ options : false ; }
Create a has one association

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

@return null
Create a has one association