Class CriticalI_Project

Description

Represents a project directory set up for managing with criticali.

Located in /Core/lib/CriticalI/Project.php (line 9)


	
			
Class Constant Summary
Variable Summary
 mixed $directory
 mixed $packageList
 mixed $properties
 mixed $type
Method Summary
 CriticalI_Project __construct (string $dir)
 void add_init_file (string $file)
 void directory ()
 int directory_entry_count (string $dir)
 void is_absolute (string $path)
 void is_installed (mixed $pkg, [string $ver = null])
 void packages ()
 mixed property (string $name, [mixed $default = null])
 void remove (string $packageName)
 void remove_init_file (string $file)
 void set_status_listener ( $listener)
 void status_listener ()
 void type ()
 void uninstall_dependency_list (string $packageName)
 void uninstall_files (array $manifest)
 void uninstall_init_script_listings (array $manifest)
 void uninstall_package_in_list (string $packageName)
Variables
mixed $directory (line 13)
  • access: protected
mixed $packageList (line 17)
  • access: protected
mixed $properties (line 15)
  • access: protected
mixed $statusListener (line 16)
  • access: protected
mixed $type (line 14)
  • access: protected
Methods
Constructor __construct (line 23)

Constructor

  • access: public
CriticalI_Project __construct (string $dir)
  • string $dir: Project root directory
add (line 200)

Add a package to the project.

This is a low-level method. It does not perform any error checking or dependency resolution. Create a CriticalI_ChangeManager_Plan and pass it to the perform method for higher level functionality.

  • access: public
void add (CriticalI_Package_Version $pkg)
add_init_file (line 591)

Add a file to the list in the init_files property. This method also prevents files from being added to the list more than once.

  • access: protected
void add_init_file (string $file)
  • string $file: The file to add
directory (line 44)

Returns the project's directory

  • access: public
void directory ()
directory_entry_count (line 509)

Count the number of entries in a directory (not counting self and parent)

  • return: Count of entries or false on error
  • access: protected
int directory_entry_count (string $dir)
  • string $dir: The directory to check
install_dependency_list (line 377)

Add dependencies for a newly installed package to this project's properties

  • access: protected
void install_dependency_list (CriticalI_Package $pkg)
install_files (line 281)

Install the files for a package

  • access: protected
void install_files (CriticalI_Project_InstallOperation $install, CriticalI_Package $pkg)
install_init_files (line 325)

Add any specified classes to the init_files property for a package

  • access: protected
void install_init_files (CriticalI_Package $pkg)
install_package_in_list (line 394)

Add the given package to our list of installed packages

  • access: protected
void install_package_in_list (CriticalI_Project_InstallOperation $install, CriticalI_Package $pkg)
install_property_defaults (line 311)

Set any property defaults for a package

  • access: protected
void install_property_defaults (CriticalI_Project_InstallOperation $install, CriticalI_Package $pkg)
install_uninstallers (line 414)

Add any specified classes to the uninstallers property for a package

  • access: protected
void install_uninstallers (CriticalI_Package $pkg)
is_absolute (line 498)

Test a path to see if it is absolute

  • access: protected
void is_absolute (string $path)
  • string $path: The path to test
is_installed (line 151)

Test to see if a package is already installed

  • access: public
void is_installed (mixed $pkg, [string $ver = null])
  • mixed $pkg: A package name, CriticalI_Package, or CriticalI_Package_Version
  • string $ver: An optional version specification
packages (line 127)

Return a list of installed packages and their versions. Data is

returned as an array:

  1.    array(
  2.      'activerecord' => '0.2.0',
  3.      'log4php'      => '0.1.0',
  4.      'support'      => '0.2.0'
  5.    );

  • access: public
void packages ()
package_list (line 138)

Return the list of installed packages as a CriticalI_Project_PackageList (which contains CriticalI_Package objects instead of just a hash of strings).

  • access: public
perform (line 179)

Perform the set of operations prescribed by a CriticalI_ChangeManager_Plan

  • access: public
void perform (CriticalI_ChangeManager_Plan $plan)
private_directory (line 54)

Returns the project's private directory.

For outside public projects, that's the root. For inside public projects, that's a directory called "private".

  • access: public
void private_directory ()
property (line 112)

Return the value of a property for this project

  • access: public
mixed property (string $name, [mixed $default = null])
  • string $name: The name of the property to retrieve
  • mixed $default: The default value for the property if not found
public_directory (line 68)

Returns the project's public directory.

For outside public projects, that's a directory called "public". For inside public projects, that's the root.

  • access: public
void public_directory ()
remove (line 242)

Remove a package from the project.

This is a low-level method. It does not perform any error checking or dependency resolution. Create a CriticalI_ChangeManager_Plan and pass it to the perform method for higher level functionality.

  • access: public
void remove (string $packageName)
  • string $packageName: The name of the package to remove
remove_init_file (line 607)

Remove a file from the list in the init_files property.

  • access: protected
void remove_init_file (string $file)
  • string $file: The file to add
run_installers_for (line 346)

Run any specified installers for a package

  • access: protected
void run_installers_for (CriticalI_Project_InstallOperation $install, CriticalI_Package $pkg)
run_uninstallers_for (line 440)

Run any registered uninstallers for a package

  • access: protected
void run_uninstallers_for (CriticalI_Project_PackageVersion $pkg)
set_status_listener (line 93)

Set the status listener

  • access: public
void set_status_listener ( $listener)
  • $listener
status_listener (line 86)

Return the status listener

  • access: public
void status_listener ()
type (line 79)

Returns the project's type

  • access: public
void type ()
uninstall_dependency_list (line 529)

Remove dependencies for a package from this project's properties

  • access: protected
void uninstall_dependency_list (string $packageName)
  • string $packageName: The package to remove dependencies for
uninstall_files (line 473)

Remove all of the files in a listing. Any directories in the listing are removed if they are empty after first removing all other files in the list.

  • access: protected
void uninstall_files (array $manifest)
  • array $manifest: List of files to remove
uninstall_init_script_listings (line 567)

Remove any listings in the init_files property for the removed files listed in $manifest

  • access: protected
void uninstall_init_script_listings (array $manifest)
  • array $manifest: The manifest of recently removed files
uninstall_package_in_list (line 541)

Remove the given package from our list of installed packages

  • access: protected
void uninstall_package_in_list (string $packageName)
  • string $packageName: The package to remove
write_properties (line 100)

Write the properties file out

  • access: protected
void write_properties ()
Class Constants
INSIDE_PUBLIC = 0 (line 10)
OUTSIDE_PUBLIC = 1 (line 11)

Documentation generated on Wed, 25 Apr 2012 09:46:44 -0700 by phpDocumentor 1.4.3