Tool/Project/Profile.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Tool
- Subpackage
- Framework
- Version
- $Id: Profile.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Tool_Project_Profile
This class is the front most class for utilizing Zend_Tool_Project
A profile is a hierarchical set of resources that keep track of items within a specific project.
- Parent(s)
- \Zend_Tool_Project_Profile_Resource_Container
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


bool $_appendable = true
true
Details- Type
- bool
- Inherited_from
- \Zend_Tool_Project_Profile_Resource_Container::$$_appendable


array $_attributes = array()
array()
Details- Type
- array
- Inherited_from
- \Zend_Tool_Project_Profile_Resource_Container::$$_attributes


int $_position = 0
0
Details- Type
- int
- Inherited_from
- \Zend_Tool_Project_Profile_Resource_Container::$$_position


array $_subResources = array()
array()
Details- Type
- array
- Inherited_from
- \Zend_Tool_Project_Profile_Resource_Container::$$_subResources
Methods


__construct(array $options = null) : bool
Constructor, standard usage would allow the setting of options
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
bool |


__toString() : string
__toString() - cast this profile to string to be able to view it.
Type | Description |
---|---|
string |


append(\Zend_Tool_Project_Profile_Resource_Container $resource) : \Zend_Tool_Project_Profile_Resource_Container
Name | Type | Description |
---|---|---|
$resource | \Zend_Tool_Project_Profile_Resource_Container |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


createResource(string $context, array $attributes = array()) : \Zend_Tool_Project_Profile_Resource
createResource()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::createResource()Method to create a resource with a given context with specific attributes
Name | Type | Description |
---|---|---|
$context | string | |
$attributes | array |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource |


createResourceAt(array | \Zend_Tool_Project_Profile_Resource_SearchConstraints $appendResourceOrSearchConstraints, string $context, array $attributes = array()) : \Zend_Tool_Project_Profile_Resource
createResourceAt()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::createResourceAt()Name | Type | Description |
---|---|---|
$appendResourceOrSearchConstraints | array | \Zend_Tool_Project_Profile_Resource_SearchConstraints | |
$context | string | |
$attributes | array |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource |


current() : \Zend_Tool_Project_Profile_Resource
current() - required by RecursiveIterator
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::current()Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource |


getAttribute(string $name) : \Zend_Tool_Project_Profile_Resource_Container
getAttribute()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getAttribute()Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


getAttributes() : array
getAttributes()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getAttributes()Type | Description |
---|---|
array |


getIterator() : \RecursiveIteratorIterator
getIterator() - reqruied by the RecursiveIterator interface
Type | Description |
---|---|
\RecursiveIteratorIterator |


getParentResource() : \Zend_Tool_Project_Profile_Resource_Container
getParentResource()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getParentResource()Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


hasAttribute(string $name) : bool
hasAttribute()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::hasAttribute()Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |


isAppendable() : bool
isAppendable()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::isAppendable()Type | Description |
---|---|
bool |


isLoadableFromFile() : bool
isLoadableFromFile() - can a profile be loaded from a file
wether or not a profile can be loaded from the file in attribute 'projectProfileFile', or from a file named '.zfproject.xml' inside a directory in key 'projectDirectory'
Type | Description |
---|---|
bool |


key() : int
key() - required by RecursiveIterator
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::key()Type | Description |
---|---|
int |


loadFromData() : void
loadFromData() - Load a profile from data provided by the 'profilData' attribute


loadFromFile() : void
loadFromFile() - Load data from file
this attempts to load a project profile file from a variety of locations depending on what information the user provided vie $options or attributes, specifically the 'projectDirectory' or 'projectProfileFile'


next() : bool
next() - required by RecursiveIterator
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::next()Type | Description |
---|---|
bool |


rewind() : bool
rewind() - required by RecursiveIterator
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::rewind()Type | Description |
---|---|
bool |


search( $matchSearchConstraints, $nonMatchSearchConstraints = null) : \Zend_Tool_Project_Profile_Resource
Finder method to be able to find resources by context name and attributes.
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::search()Example usage:
Name | Type | Description |
---|---|---|
$matchSearchConstraints | ||
$nonMatchSearchConstraints |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource |


setAppendable(bool $appendable) : \Zend_Tool_Project_Profile_Resource_Container
setAppendable()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAppendable()Name | Type | Description |
---|---|---|
$appendable | bool |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


setAttribute(string $name, mixed $value) : \Zend_Tool_Project_Profile_Resource_Container
setAttribute()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAttribute()Name | Type | Description |
---|---|---|
$name | string | |
$value | mixed |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


setAttributes(array $attributes) : \Zend_Tool_Project_Profile_Resource_Container
setAttributes()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAttributes()persist the attributes if the resource will accept them
Name | Type | Description |
---|---|---|
$attributes | array |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


setOptions(array $options) : void
Process options and either set a profile property or set a profile 'attribute'
Name | Type | Description |
---|---|---|
$options | array |


setParentResource(\Zend_Tool_Project_Profile_Resource_Container $parentResource) : \Zend_Tool_Project_Profile_Resource_Container
setParentResource()
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setParentResource()Name | Type | Description |
---|---|---|
$parentResource | \Zend_Tool_Project_Profile_Resource_Container |
Type | Description |
---|---|
\Zend_Tool_Project_Profile_Resource_Container |


storeToData() : string
storeToData() - create a string representation of the profile in memory
Type | Description |
---|---|
string |


storeToFile() : void
storeToFile() - store the current profile to file
This will store the profile in memory to a place on disk determined by the attributes available, specifically if the key 'projectProfileFile' is available


valid() : bool
valid() - - required by RecursiveIterator
Inherited from: \Zend_Tool_Project_Profile_Resource_Container::valid()Type | Description |
---|---|
bool |