public function className($className, $arguments = null, $constructor = null)
    {
        // flush maybe exisiting content
        $this->flush();

        // store className
        $this->className = $className;

        // add arguments if given
        if (!is_null($arguments) && is_array($arguments)) {
            $this->getCollection()->setArguments($className, $arguments);
        }

        // add constructor if given
        if (!is_null($constructor)) {
            $this->getCollection()->setConstructor($className, $constructor);
        }

        // fluent interface
        return $this;
    }
public function className($className, $arguments = null, $constructor = null)
    {
        // flush maybe exisiting content
        $this->flush();

        // store className
        $this->className = $className;

        // add arguments if given
        if (!is_null($arguments) && is_array($arguments)) {
            $this->getCollection()->setArguments($className, $arguments);
        }

        // add constructor if given
        if (!is_null($constructor)) {
            $this->getCollection()->setConstructor($className, $constructor);
        }

        // fluent interface
        return $this;
    }
public function className ( $ className , $ arguments = null , $ constructor = null ) { // flush maybe exisiting content $ this -> flush ( ) ; // store className $ this -> className = $ className ; // add arguments if given if ( ! is_null ( $ arguments ) && is_array ( $ arguments ) ) { $ this -> getCollection ( ) -> setArguments ( $ className , $ arguments ) ; } // add constructor if given if ( ! is_null ( $ constructor ) ) { $ this -> getCollection ( ) -> setConstructor ( $ className , $ constructor ) ; } // fluent interface return $ this ; }
Setter for the name of the class which has dependencies.

This method is intend to set the name of the class which has dependencies.

@param string $className   The name of the class which has dependencies
@param mixed  $arguments   The arguments to pass to constructor of class
@param mixed  $constructor The constructor of the class

@author Benjamin Carl <opensource@clickalicious.de>

@return Doozr_Di_Map_Fluent Instance of this class (for method chaining)
Setter for the name of the class which has dependencies .