public function validateProperties(array $properties)
    {
        $definedProperties = $this->defineProperties() ?: [];

        /*
         * Determine and implement default values
         */
        $defaultProperties = [];

        foreach ($definedProperties as $name => $information) {
            if (array_key_exists('default', $information)) {
                $defaultProperties[$name] = $information['default'];
            }
        }

        $properties = array_merge($defaultProperties, $properties);

        return $properties;
    }
public function validateProperties(array $properties)
    {
        $definedProperties = $this->defineProperties() ?: [];

        /*
         * Determine and implement default values
         */
        $defaultProperties = [];

        foreach ($definedProperties as $name => $information) {
            if (array_key_exists('default', $information)) {
                $defaultProperties[$name] = $information['default'];
            }
        }

        $properties = array_merge($defaultProperties, $properties);

        return $properties;
    }
public function validateProperties ( array $ properties ) { $ definedProperties = $ this -> defineProperties ( ) ? : [ ] ; /*
         * Determine and implement default values
         */ $ defaultProperties = [ ] ; foreach ( $ definedProperties as $ name => $ information ) { if ( array_key_exists ( 'default' , $ information ) ) { $ defaultProperties [ $ name ] = $ information [ 'default' ] ; } } $ properties = array_merge ( $ defaultProperties , $ properties ) ; return $ properties ; }
Validates the properties against the defined properties of the class.
This method also sets default properties.
@param array $properties The supplied property values.
@return array The validated property set, with defaults applied.
Validates the properties against the defined properties of the class . This method also sets default properties .