示例#1
0
 public function asArgument()
 {
     if (!$this->getParent()) {
         $sName = '<racine>';
         $sPath = '';
     } else {
         $sName = $this->getName();
         $sPath = $this->getFullPath();
     }
     require_once 'core/functions/Global.php';
     return $this->getControler()->createArgument(array('directory' => array('path' => $sPath, 'owner' => $this->getOwner(), 'group' => $this->getGroup(), 'mode' => $this->getMode(), 'read' => functions\booltostr($this->checkRights(\Sylma::MODE_READ)), 'write' => functions\booltostr($this->checkRights(\Sylma::MODE_WRITE)), 'execution' => functions\booltostr($this->checkRights(\Sylma::MODE_EXECUTE)), 'name' => $sName)), self::NS);
 }
示例#2
0
 protected function loadElement(dom\element $el, dom\handler $doc, fs\file $file)
 {
     $bResult = $this->test($el, $el->read(), $this->getControler(), $doc, $file);
     $aResult = array('@name' => $el->getAttribute('name'), 'result' => functions\booltostr($bResult));
     if (!$bResult) {
         $aResult['message'] = '';
     }
     // ? TODO suspicious..
     return $aResult;
 }
示例#3
0
 public function asArgument()
 {
     $iSize = $this->getSize() / 1000;
     if ($iSize < 1) {
         $iSize = 1;
     }
     require_once 'core/functions/Global.php';
     return $this->getControler()->createArgument(array('file' => array('path' => $this->getFullPath(), 'action-path' => $this->asPath(), 'name' => $this->getName(), 'simple-name' => $this->getSimpleName(), 'owner' => $this->getOwner(), 'group' => $this->getGroup(), 'mode' => $this->getMode(), 'read' => functions\booltostr($this->checkRights(\Sylma::MODE_READ)), 'write' => functions\booltostr($this->checkRights(\Sylma::MODE_WRITE)), 'execution' => functions\booltostr($this->checkRights(\Sylma::MODE_EXECUTE)), 'size' => $iSize, 'extension' => $this->getExtension())), $this->getControler()->getNamespace());
 }