public function setEmployees(
        array $employees)
    {
        $this->_employees = $employees;

        // We now need to construct a new, inner value for the property. Since
        // it's a "mixed" property, it only accepts basic PHP types.
        $newInnerValue = [];
        foreach ($this->_employees as $k => $v) {
            $newInnerValue[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        // Now use the internal _setProperty() API to set the new inner value.
        // NOTE: This function only throws if the new value contains any
        // invalid non-basic data. Only basic PHP types are accepted.
        $this->_setProperty('employees', $newInnerValue);

        return $this;
    }
public function setEmployees(
        array $employees)
    {
        $this->_employees = $employees;

        // We now need to construct a new, inner value for the property. Since
        // it's a "mixed" property, it only accepts basic PHP types.
        $newInnerValue = [];
        foreach ($this->_employees as $k => $v) {
            $newInnerValue[$k] = is_object($v) && $v instanceof LazyJsonMapper
                               ? $v->asArray() // Throws.
                               : $v; // Is already a valid value.
        }

        // Now use the internal _setProperty() API to set the new inner value.
        // NOTE: This function only throws if the new value contains any
        // invalid non-basic data. Only basic PHP types are accepted.
        $this->_setProperty('employees', $newInnerValue);

        return $this;
    }
public function setEmployees ( array $ employees ) { $ this -> _employees = $ employees ; // We now need to construct a new, inner value for the property. Since // it's a "mixed" property, it only accepts basic PHP types. $ newInnerValue = [ ] ; foreach ( $ this -> _employees as $ k => $ v ) { $ newInnerValue [ $ k ] = is_object ( $ v ) && $ v instanceof LazyJsonMapper ? $ v -> asArray ( ) // Throws. : $ v ; // Is already a valid value. } // Now use the internal _setProperty() API to set the new inner value. // NOTE: This function only throws if the new value contains any // invalid non-basic data. Only basic PHP types are accepted. $ this -> _setProperty ( 'employees' , $ newInnerValue ) ; return $ this ; }
Set the list of employees.

NOTE: This overrides the normal, automatic LazyJsonMapper setter! By
naming our function identically, we override its behavior!

@param array $employees

@throws LazyJsonMapperException

@return $this
Set the list of employees .