/** * Inserts <i>$value</i> at the end of the list. * * @param MString $value * @throws MWrongTypeException */ public function append(MString $value) { parent::append($value); }
/** * Inserts <i>$value</i> at the end of the list. * * @param MFileInfo $value * @throws MWrongTypeException */ public function append(MFileInfo $value) { parent::append($value); }
/** * Returns the complete MList<FilePermission> for the file. * * @return \MToolkit\Core\MList */ public function permissions() { $perms = fileperms($this->getAbsoluteFilePath()); $permissions = new MList(); // Owner if ($perms & 0x100) { $permissions->append(FilePermission::READ_OWNER); } if ($perms & 0x80) { $permissions->append(FilePermission::WRITE_OWNER); } if ($perms & 0x40 & !($perms & 0x800)) { $permissions->append(FilePermission::EXE_OWNER); } // Group if ($perms & 0x20) { $permissions->append(FilePermission::READ_GROUP); } if ($perms & 0x10) { $permissions->append(FilePermission::WRITE_GROUP); } if ($perms & 0x8 && !($perms & 0x400)) { $permissions->append(FilePermission::EXE_GROUP); } // World if ($perms & 0x4) { $permissions->append(FilePermission::READ_OTHER); } if ($perms & 0x2) { $permissions->append(FilePermission::WRITE_OTHER); } if ($perms & 0x1 && !($perms & 0x200)) { $permissions->append(FilePermission::EXE_OTHER); } if ($this->isWritable()) { $permissions->append(FilePermission::READ_USER); } if ($this->isReadable()) { $permissions->append(FilePermission::WRITE_USER); } if ($this->isExecutable()) { $permissions->append(FilePermission::EXE_USER); } return $permissions; }
public function append(MDropDownListItem &$item) { $this->keys[$item->getKey()] = $item; $this->value[$item->getValue()] = $item; parent::append($item); }