setAttributes($config); } } /** * @param mixed $keyctl * @return Features */ public function setKeyctl($keyctl) { $this->keyctl = $keyctl; return $this; } /** * @param mixed $nesting * @return Features */ public function setNesting($nesting) { $this->nesting = $nesting; return $this; } /** * @param mixed $mount * @return Features */ public function setMount($mount) { $this->mount = $mount; return $this; } /** * @param mixed $fuse * @return Features */ public function setFuse($fuse) { $this->fuse = $fuse; return $this; } /** * @param mixed $mknod * @return Features */ public function setMknod($mknod) { $this->mknod = $mknod; return $this; } /** * @return mixed */ public function getKeyctl() { return $this->keyctl; } /** * @return mixed */ public function getNesting() { return $this->nesting; } /** * @return mixed */ public function getMount() { return $this->mount; } /** * @return mixed */ public function getFuse() { return $this->fuse; } /** * @return mixed */ public function getMknod() { return $this->mknod; } public function addNfs(){ if(is_null($this->mount)){ $this->mount = 'nfs'; }else if(!preg_match("/nfs/", $this->mount)){ $this->mount .= ';nfs'; } return $this; } public function addCifs(){ if(is_null($this->mount)){ $this->mount = 'cifs'; }else if(!preg_match("/cifs/", $this->mount)){ $this->mount .= ';cifs'; } return $this; } public function isEmpty(){ return is_null($this->keyctl) && is_null($this->nesting) && is_null($this->mount) && is_null($this->fuse) && is_null($this->mknod); } public function asConfig(){ $filable=[]; if($this->keyctl){ $filable[] = 'keyctl'; } if($this->nesting){ $filable[] = 'nesting'; } if($this->mount){ $filable[] = 'mount'; } if($this->fuse){ $filable[] = 'fuse'; } if($this->mknod){ $filable[] = 'mknod'; } $config = []; $this->toConfig($filable, $config); return implode(",", $config); } }