Tool/Project/Profile.php

Show: inherited
Table of Contents

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

Package: Zend\Tool

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

Propertyprotectedbool $_appendable = true
Default valuetrueDetails
Type
bool
Inherited_from
\Zend_Tool_Project_Profile_Resource_Container::$$_appendable  
Propertyprotectedarray $_attributes = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Tool_Project_Profile_Resource_Container::$$_attributes  
Propertyprotectedint $_position = 0
Default value0Details
Type
int
Inherited_from
\Zend_Tool_Project_Profile_Resource_Container::$$_position  
Propertyprotectedarray $_subResources = array()
Default valuearray()Details
Type
array
Inherited_from
\Zend_Tool_Project_Profile_Resource_Container::$$_subResources  
Propertyprotectedbool $_traverseEnabled = false
static

Default valuefalseDetails
Type
bool

Methods

methodpublic__clone() : void
methodpublic__construct(array $options = null) : bool

Constructor, standard usage would allow the setting of options

Parameters
Name Type Description
$options array
Returns
Type Description
bool
methodpublic__toString() : string

__toString() - cast this profile to string to be able to view it.

Returns
Type Description
string
methodpubliccount() : int
Returns
Type Description
int
methodpubliccreateResource(string $context, array $attributes = array()) : \Zend_Tool_Project_Profile_Resource
inherited

createResource()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::createResource()

Method to create a resource with a given context with specific attributes

Parameters
Name Type Description
$context string
$attributes array
Returns
Type Description
\Zend_Tool_Project_Profile_Resource
methodpubliccreateResourceAt(array | \Zend_Tool_Project_Profile_Resource_SearchConstraints $appendResourceOrSearchConstraints, string $context, array $attributes = array()) : \Zend_Tool_Project_Profile_Resource
inherited

createResourceAt()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::createResourceAt()
Parameters
Name Type Description
$appendResourceOrSearchConstraints array | \Zend_Tool_Project_Profile_Resource_SearchConstraints
$context string
$attributes array
Returns
Type Description
\Zend_Tool_Project_Profile_Resource
methodpubliccurrent() : \Zend_Tool_Project_Profile_Resource
inherited

current() - required by RecursiveIterator

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::current()
Returns
Type Description
\Zend_Tool_Project_Profile_Resource
methodpublicgetAttribute(string $name) : \Zend_Tool_Project_Profile_Resource_Container
inherited

getAttribute()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getAttribute()
Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Tool_Project_Profile_Resource_Container
methodpublicgetAttributes() : array
inherited

getAttributes()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getAttributes()
Returns
Type Description
array
methodpublicgetChildren() : array
inherited

getChildren()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::getChildren()
Returns
Type Description
array
methodpublicgetIterator() : \RecursiveIteratorIterator

getIterator() - reqruied by the RecursiveIterator interface

Returns
Type Description
\RecursiveIteratorIterator
methodpublichasAttribute(string $name) : bool
inherited

hasAttribute()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::hasAttribute()
Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublichasChildren() : bool
inherited

hasChildren()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::hasChildren()
Returns
Type Description
bool
methodpublicisAppendable() : bool
inherited

isAppendable()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::isAppendable()
Returns
Type Description
bool
methodpublicisLoadableFromFile() : 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'

Returns
Type Description
bool
methodpublickey() : int
inherited

key() - required by RecursiveIterator

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::key()
Returns
Type Description
int
methodpublicloadFromData() : void

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

methodpublicloadFromFile() : 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'

methodpublicnext() : bool
inherited

next() - required by RecursiveIterator

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::next()
Returns
Type Description
bool
methodpublicrewind() : bool
inherited

rewind() - required by RecursiveIterator

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::rewind()
Returns
Type Description
bool
methodpublicsearch( $matchSearchConstraints,  $nonMatchSearchConstraints = null) : \Zend_Tool_Project_Profile_Resource
inherited

Finder method to be able to find resources by context name and attributes.

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::search()

Example usage:


Parameters
Name Type Description
$matchSearchConstraints
$nonMatchSearchConstraints
Returns
Type Description
\Zend_Tool_Project_Profile_Resource
methodpublicsetAppendable(bool $appendable) : \Zend_Tool_Project_Profile_Resource_Container
inherited

setAppendable()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAppendable()
Parameters
Name Type Description
$appendable bool
Returns
Type Description
\Zend_Tool_Project_Profile_Resource_Container
methodpublicsetAttribute(string $name, mixed $value) : \Zend_Tool_Project_Profile_Resource_Container
inherited

setAttribute()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAttribute()
Parameters
Name Type Description
$name string
$value mixed
Returns
Type Description
\Zend_Tool_Project_Profile_Resource_Container
methodpublicsetAttributes(array $attributes) : \Zend_Tool_Project_Profile_Resource_Container
inherited

setAttributes()

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::setAttributes()

persist the attributes if the resource will accept them

Parameters
Name Type Description
$attributes array
Returns
Type Description
\Zend_Tool_Project_Profile_Resource_Container
methodpublicsetOptions(array $options) : void

Process options and either set a profile property or set a profile 'attribute'

Parameters
Name Type Description
$options array
methodpublicstoreToData() : string

storeToData() - create a string representation of the profile in memory

Returns
Type Description
string
methodpublicstoreToFile() : 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

methodpublicvalid() : bool
inherited

valid() - - required by RecursiveIterator

Inherited from: \Zend_Tool_Project_Profile_Resource_Container::valid()
Returns
Type Description
bool
Documentation was generated by phpDocumentor 2.0.0a8.