function setProps (array $props = null)
  {
    if ($this->supportsProperties ()) {
      if ($props)
        $this->props->apply ($props);
    }
    else if ($props)
      throw new ComponentException($this, 'This component does not support properties.');
  }
function setProps (array $props = null)
  {
    if ($this->supportsProperties ()) {
      if ($props)
        $this->props->apply ($props);
    }
    else if ($props)
      throw new ComponentException($this, 'This component does not support properties.');
  }
function setProps ( array $ props = null ) { if ( $ this -> supportsProperties ( ) ) { if ( $ props ) $ this -> props -> apply ( $ props ) ; } else if ( $ props ) throw new ComponentException ( $ this , 'This component does not support properties.' ) ; }
Initializes a newly created component with the given properties, if any.

> **Warning:** for some components this method will not be called (ex: Text).

@param array|null $props A map of the component instance's properties being applied.
@throws ComponentException
@throws ReflectionPropertyException
Initializes a newly created component with the given properties if any .