Platformsh\Cli\Command\CommandBase::__construct PHP Метод

__construct() публичный Метод

public __construct ( $name = null )
    public function __construct($name = null)
    {
        // The config dependency is static for performance reasons: there are
        // always many CommandBase objects instantiated, and the config does not
        // need to change.
        if (!isset(self::$config)) {
            self::$config = new CliConfig();
        }
        $this->localProject = new LocalProject(self::$config);
        parent::__construct($name);
    }

Usage Example

 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->propertyFormatter = new PropertyFormatter();
 }