public function set($property, $value)
        {
            if (!is_string($property) || empty($property)) {
                throw new Exception(
                        'Invalid argument: $property must be a non-empty string');
            }

            $method = 'set' . self::_normalizePropertyName($property);

            if ($method != 'setOptions' && $method != 'setConfig' &&
                method_exists($this, $method)) {
                $this->$method($value);
            } else {
                $this->_properties[$property] = $value;
            }

            return $this;
        }
public function set($property, $value)
        {
            if (!is_string($property) || empty($property)) {
                throw new Exception(
                        'Invalid argument: $property must be a non-empty string');
            }

            $method = 'set' . self::_normalizePropertyName($property);

            if ($method != 'setOptions' && $method != 'setConfig' &&
                method_exists($this, $method)) {
                $this->$method($value);
            } else {
                $this->_properties[$property] = $value;
            }

            return $this;
        }
public function set ( $ property , $ value ) { if ( ! is_string ( $ property ) || empty ( $ property ) ) { throw new Exception ( 'Invalid argument: $property must be a non-empty string' ) ; } $ method = 'set' . self :: _normalizePropertyName ( $ property ) ; if ( $ method != 'setOptions' && $ method != 'setConfig' && method_exists ( $ this , $ method ) ) { $ this -> $ method ( $ value ) ; } else { $ this -> _properties [ $ property ] = $ value ; } return $ this ; }
Sets the given property

If the given property is native (id, class, title, etc), the matching
set method will be used. Otherwise, it will be set as a custom property.

@param  string $property           property name
@param  mixed  $value              value to set
@return Page       fluent interface, returns self
@throws Exception  if property name is invalid
Sets the given property