public function construct($subject, &$data = array())
    {
        if (null === $this->constructed) {
            $this->constructed = unserialize(
                sprintf(
                    'O:%d:"%s":0:{}',
                    strlen($subject),
                    $subject
                )
            );
        }
        return clone $this->constructed;
    }
public function construct($subject, &$data = array())
    {
        if (null === $this->constructed) {
            $this->constructed = unserialize(
                sprintf(
                    'O:%d:"%s":0:{}',
                    strlen($subject),
                    $subject
                )
            );
        }
        return clone $this->constructed;
    }
public function construct ( $ subject , & $ data = array ( ) ) { if ( null === $ this -> constructed ) { $ this -> constructed = unserialize ( sprintf ( 'O:%d:"%s":0:{}' , strlen ( $ subject ) , $ subject ) ) ; } return clone $ this -> constructed ; }
Construct a new object.

By default a new empty object is deserialized and from then on cloned.

@param string $subject The class name of the object to create
@param array  $data    The data to deserialize

@return object
Construct a new object .