public static function read($object, $property, $default = null)
    {
        if (is_null($object)) {
            return self::value($default);
        }

        if (isset($object->$property) || property_exists($object, $property)) {
            return $object->$property;
        }

        return self::value($default);
    }
public static function read($object, $property, $default = null)
    {
        if (is_null($object)) {
            return self::value($default);
        }

        if (isset($object->$property) || property_exists($object, $property)) {
            return $object->$property;
        }

        return self::value($default);
    }
public static function read ( $ object , $ property , $ default = null ) { if ( is_null ( $ object ) ) { return self :: value ( $ default ) ; } if ( isset ( $ object -> $ property ) || property_exists ( $ object , $ property ) ) { return $ object -> $ property ; } return self :: value ( $ default ) ; }
Get an item from an object.

@param      $object
@param      $property
@param null $default

@return null
Get an item from an object .