public function __construct($package, $state, $provider, $special) { $this->package = $package; $this->state = $state; $this->special = $special; if ($provider === null) { $this->provider = Runtime::getCurrent()->getPackageProvider()->getDefault(); } else { $this->provider = Runtime::getCurrent()->getPackageProvider()->getByName($provider); } }
function __construct($name, $shouldExist, $password, $groups, $shell, $home, $comment, $provider) { $this->name = $name; $this->shouldExist = $shouldExist; $this->password = $password; $this->groups = $groups; $this->shell = $shell; $this->home = $home; $this->comment = $comment; if ($provider === null) { $this->provider = Runtime::getCurrent()->getUserProvider()->getDefault(); } else { $this->provider = Runtime::getCurrent()->getUserProvider()->getByName($provider); } }
function template($file, $vars) { return Runtime::getCurrent()->getTwig()->render($file, $vars); }