public function checkRequirements()
    {
        // Iterate over properties and check if they are set and not null
        $errors = array();
        foreach ( $this->requiredProperties as $property )
        {
            if ( !isset( $this->storage->$property ) ||
                 ( $this->storage->$property === null ) )
            {
                $errors[] = $property;
            }
        }

        // If error array is still empty all requirements are met
        if ( $errors === array() )
        {
            return true;
        }

        // Otherwise return the array with errors
        return $errors;
    }
public function checkRequirements()
    {
        // Iterate over properties and check if they are set and not null
        $errors = array();
        foreach ( $this->requiredProperties as $property )
        {
            if ( !isset( $this->storage->$property ) ||
                 ( $this->storage->$property === null ) )
            {
                $errors[] = $property;
            }
        }

        // If error array is still empty all requirements are met
        if ( $errors === array() )
        {
            return true;
        }

        // Otherwise return the array with errors
        return $errors;
    }
public function checkRequirements ( ) { // Iterate over properties and check if they are set and not null $ errors = array ( ) ; foreach ( $ this -> requiredProperties as $ property ) { if ( ! isset ( $ this -> storage -> $ property ) || ( $ this -> storage -> $ property === null ) ) { $ errors [ ] = $ property ; } } // If error array is still empty all requirements are met if ( $ errors === array ( ) ) { return true ; } // Otherwise return the array with errors return $ errors ; }
Check if all requirements are met

Checks if all required properties has been set. Returns an array with
the properties, which are required but not set, or true if all
requirements are fulfilled.

@return mixed
Check if all requirements are met