Hoa central
Public Member Functions | Protected Attributes | List of all members
Hoa\File\SplFileInfo Class Reference
Inheritance diagram for Hoa\File\SplFileInfo:

Public Member Functions

 open ()
 
 close ()
 
 __destruct ()
 
- Public Member Functions inherited from Hoa\Iterator\SplFileInfo
 __construct ($filename, $relativePath=null)
 
 getHash ()
 
 getMTime ()
 
 setRelativePath ($relativePath)
 
 getRelativePath ()
 
 getRelativePathname ()
 

Protected Attributes

 $_stream = null
 
- Protected Attributes inherited from Hoa\Iterator\SplFileInfo
 $_hash = null
 
 $_relativePath = null
 

Detailed Description

Class .

Link between and .

Definition at line 49 of file SplFileInfo.php.

Constructor & Destructor Documentation

Hoa\File\SplFileInfo::__destruct ( )

Destruct.

Returns
void

Definition at line 98 of file SplFileInfo.php.

99  {
100  $this->close();
101 
102  return;
103  }

Here is the call graph for this function:

Member Function Documentation

Hoa\File\SplFileInfo::close ( )

Close the opened stream.

Returns
mixed

Definition at line 84 of file SplFileInfo.php.

85  {
86  if (null === $this->_stream) {
87  return;
88  }
89 
90  return $this->_stream->close();
91  }

Here is the caller graph for this function:

Hoa\File\SplFileInfo::open ( )

Open the SplFileInfo as a Hoa stream.

Returns
Exceptions

Definition at line 66 of file SplFileInfo.php.

67  {
68  if (true === $this->isFile()) {
69  return $this->_stream = new ReadWrite($this->getPathname());
70  } elseif (true === $this->isDir()) {
71  return $this->_stream = new Directory($this->getPathname());
72  } elseif (true === $this->isLink()) {
73  return $this->_stream = new Link\ReadWrite($this->getPathname());
74  }
75 
76  throw new Exception('%s has an unknown type.', 0, $this->getPathname());
77  }

Member Data Documentation

Hoa\File\SplFileInfo::$_stream = null
protected

Definition at line 56 of file SplFileInfo.php.


The documentation for this class was generated from the following file: