PHP Класс org\bovigo\vfs\vfsStreamDirectory

Наследование: extends vfsStreamAbstractContent, implements org\bovigo\vfs\vfsStreamContainer
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$children list of directory children

Открытые методы

Метод Описание
__construct ( string $name, integer $permissions = null ) constructor
addChild ( org\bovigo\vfs\vfsStreamContent $child ) adds child to the directory
getChild ( string $name ) : org\bovigo\vfs\vfsStreamContent returns the child with the given name
getChildren ( ) : org\bovigo\vfs\vfsStreamContent[] returns a list of children for this directory
getIterator ( ) : vfsStreamContainerIterator returns iterator for the children
hasChild ( string $name ) : boolean checks whether the container contains a child with the given name
hasChildren ( ) : boolean checks whether directory contains any children
isDot ( ) : boolean checks whether dir is a dot dir
removeChild ( string $name ) : boolean removes child from the directory
rename ( string $newName ) renames the content
setParentPath ( string $parentPath ) sets parent path
size ( ) : integer returns size of directory
sizeSummarized ( ) : integer returns summarized size of directory and its children

Защищенные методы

Метод Описание
getChildName ( string $name, string $ownName ) : string helper method to calculate the child name
getDefaultPermissions ( ) : integer returns default permissions for concrete implementation
getRealChildName ( string $name ) : string helper method to detect the real child name
updateModifications ( ) updates internal timestamps

Описание методов

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

constructor
public __construct ( string $name, integer $permissions = null )
$name string
$permissions integer optional

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

adds child to the directory
public addChild ( org\bovigo\vfs\vfsStreamContent $child )
$child org\bovigo\vfs\vfsStreamContent

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

returns the child with the given name
public getChild ( string $name ) : org\bovigo\vfs\vfsStreamContent
$name string
Результат org\bovigo\vfs\vfsStreamContent

getChildName() защищенный статический Метод

helper method to calculate the child name
protected static getChildName ( string $name, string $ownName ) : string
$name string
$ownName string
Результат string

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

returns a list of children for this directory
public getChildren ( ) : org\bovigo\vfs\vfsStreamContent[]
Результат org\bovigo\vfs\vfsStreamContent[]

getDefaultPermissions() защищенный Метод

returns default permissions for concrete implementation
С версии: 0.8.0
protected getDefaultPermissions ( ) : integer
Результат integer

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

returns iterator for the children
public getIterator ( ) : vfsStreamContainerIterator
Результат vfsStreamContainerIterator

getRealChildName() защищенный Метод

helper method to detect the real child name
protected getRealChildName ( string $name ) : string
$name string
Результат string

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

checks whether the container contains a child with the given name
public hasChild ( string $name ) : boolean
$name string
Результат boolean

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

checks whether directory contains any children
С версии: 0.10.0
public hasChildren ( ) : boolean
Результат boolean

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

checks whether dir is a dot dir
public isDot ( ) : boolean
Результат boolean

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

removes child from the directory
public removeChild ( string $name ) : boolean
$name string
Результат boolean

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

renames the content
public rename ( string $newName )
$newName string

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

sets parent path
С версии: 1.2.0
public setParentPath ( string $parentPath )
$parentPath string

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

The size of a directory is always 0 bytes. To calculate the summarized size of all children in the directory use sizeSummarized().
public size ( ) : integer
Результат integer

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

returns summarized size of directory and its children
public sizeSummarized ( ) : integer
Результат integer

updateModifications() защищенный Метод

updates internal timestamps
protected updateModifications ( )

Описание свойств

$children защищенное свойство

list of directory children
protected $children