src/ObjectValidator.php
public function addProperties($properties)
    {
        if (empty($properties) || !count((array)$properties)) {
            throw new \Exception('Empty properties given');
        }

        if (!is_array($properties) && !is_object($properties)) {
            throw new \Exception('Expected array or object');
        }

        foreach ($properties as $key => $property) {
            $this->addProperty($key, $property);
        }

        return $this;
    }
public function addProperties($properties)
    {
        if (empty($properties) || !count((array)$properties)) {
            throw new \Exception('Empty properties given');
        }

        if (!is_array($properties) && !is_object($properties)) {
            throw new \Exception('Expected array or object');
        }

        foreach ($properties as $key => $property) {
            $this->addProperty($key, $property);
        }

        return $this;
    }
public function addProperties ( $ properties ) { if ( empty ( $ properties ) || ! count ( ( array ) $ properties ) ) { throw new \ Exception ( 'Empty properties given' ) ; } if ( ! is_array ( $ properties ) && ! is_object ( $ properties ) ) { throw new \ Exception ( 'Expected array or object' ) ; } foreach ( $ properties as $ key => $ property ) { $ this -> addProperty ( $ key , $ property ) ; } return $ this ; }
Add properties to this object validator
@param array||object $properties [description]
@throws \Exception If properties is not an array
Add properties to this object validator