MvcLite\File
Class to contain logic for accessing files
- Author: Cory Collier <corycollier@corycollier.com>
Synopsis
- // Inherited constants from ObjectAbstract
- const MSG_ERR_IDENTIFY = 'Descendents must implement the identify method';
- // members
- protected string $contents = '';
- // methods
- public boolean test()
- public File save()
- public File load()
- public File delete()
- public string getContents()
- public File setContents()
- protected void checkFileExists()
- // Inherited methods from ObjectAbstract
- public final void __get()
- public final void __set()
- public final void __call()
- public void __toString()
- public string identify()
- // Inherited methods from Filepath
- public Request filepath()
Hierarchy
Coverage
Methods | 100% | 7 / 7 |
Lines | 100% | 21 / 21 |
Constants
Name | Value |
---|---|
MSG_ERR_IDENTIFY | 'Descendents must implement the identify method' |
Members
protected
- $contents
—
string
The contents of the instance's file.
Methods
protected
- checkFileExists() — method to throw an exception if a given filename doesn't exist
public
- delete() — Deletes a file by filename.
- getContents() — Getter for the _contents property
- load() — loads file information to the file instance
- save() — Saves the content of the file to a provided filename.
- setContents() — Setter for the contents property.
- test() — tests the existance of a given filename
Inherited from MvcLite\ObjectAbstract
public
- __call() — Overriding the __call magic method
- __get() — Overriding the __get magic method
- __set() — Overriding the __set magic method
- __toString() — returns a string representation of the object
- identify() — method used to identify the object instance
Inherited from MvcLite\Traits\Filepath
public
- filepath() — Getter for the Request instance.
History
-
2015-12-15T09:42:10-05:00 (commit #0bcf089)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
A lot of code minor code cleanup. Updating some methods to split up code a bit
-
2015-12-14T22:01:17-05:00 (commit #3ca33f8)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
General code cleanup. Also getting unit test coverage for the Dispatcher up to 100%
-
2015-11-30T18:03:08-05:00 (commit #edb2b58)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
LOTS of code cleanup here. Fixing unit tests for those cleanups as well
-
2015-11-29T16:46:01-05:00 (commit #846ee53)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
Adding traits, implementing them on Cache, Database, Dispatcher, Error, and Request classes. Adding a TestCase class, to simplify unit test writing. Updating unit tests
-
2015-11-29T13:59:13-05:00 (commit #5ca1372)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
,
-
2015-11-27T22:46:57-05:00 (commit #3067c88)
Author: Cory Collier (ccollier@redhat.com) / Commiter: Cory Collier (ccollier@redhat.com)
Provisional commit - Not done moving things around to be namespace compliant. This commit is completely not functional
-
2015-11-11T08:14:50-05:00 (commit #ad28461)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
More moving things around
-
2015-11-11T08:07:21-05:00 (commit #3838504)
Author: Cory Collier (corycollier@corycollier.com) / Commiter: Cory Collier (corycollier@corycollier.com)
Re-introducing the library components as first class items