public function add_component( array $args )
    {
        if(!array_key_exists('type', $args))
        {
            throw new \RuntimeException("Component configuration arrays must have a <b>type</b> argument");
        }

        $comp = ComponentFactory::create($args['type'], $args);

        $this->verify_name_uniqueness($comp);
        $this->components[] = $comp;
    }
public function add_component( array $args )
    {
        if(!array_key_exists('type', $args))
        {
            throw new \RuntimeException("Component configuration arrays must have a <b>type</b> argument");
        }

        $comp = ComponentFactory::create($args['type'], $args);

        $this->verify_name_uniqueness($comp);
        $this->components[] = $comp;
    }
public function add_component ( array $ args ) { if ( ! array_key_exists ( 'type' , $ args ) ) { throw new \ RuntimeException ( "Component configuration arrays must have a <b>type</b> argument" ) ; } $ comp = ComponentFactory :: create ( $ args [ 'type' ] , $ args ) ; $ this -> verify_name_uniqueness ( $ comp ) ; $ this -> components [ ] = $ comp ; }
Add a single component to the list

@param AbstractComponent[] $args
@return void
Add a single component to the list