protected function getProperty($object, $key)
    {
        if (isset($object->{$key}) &&
            (
                (is_int($object->{$key}) && $object->{$key} != 0) ||
                (is_string($object->{$key}) && $object->{$key} != '')
            )
        ) {
            return $object->{$key};
        }

        return null;
    }
protected function getProperty($object, $key)
    {
        if (isset($object->{$key}) &&
            (
                (is_int($object->{$key}) && $object->{$key} != 0) ||
                (is_string($object->{$key}) && $object->{$key} != '')
            )
        ) {
            return $object->{$key};
        }

        return null;
    }
protected function getProperty ( $ object , $ key ) { if ( isset ( $ object -> { $ key } ) && ( ( is_int ( $ object -> { $ key } ) && $ object -> { $ key } != 0 ) || ( is_string ( $ object -> { $ key } ) && $ object -> { $ key } != '' ) ) ) { return $ object -> { $ key } ; } return null ; }
Get a property from an object.  Return the value if it exists.

@param $object
@param $key

@return null
Get a property from an object . Return the value if it exists .