Skip to content

Commit

Permalink
Add @link to App docblocks and missing _packageFormat docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Nov 13, 2011
1 parent 9347ca2 commit dba4d21
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/Cake/Core/App.php
Expand Up @@ -205,6 +205,7 @@ class App {
* @param string $type type of path
* @param string $plugin name of plugin
* @return string array
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::path
*/
public static function path($type, $plugin = null) {
if (!empty(self::$legacy[$type])) {
Expand Down Expand Up @@ -236,6 +237,7 @@ public static function path($type, $plugin = null) {
* use App::path()
*
* @return array An array of packages and their associated paths.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::paths
*/
public static function paths() {
return self::$_packages;
Expand All @@ -259,6 +261,7 @@ public static function paths() {
* @param array $paths associative array with package names as keys and a list of directories for new search paths
* @param mixed $mode App::RESET will set paths, App::APPEND with append paths, App::PREPEND will prepend paths, [default] App::PREPEND
* @return void
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::build
*/
public static function build($paths = array(), $mode = App::PREPEND) {
//Provides Backwards compatibility for old-style package names
Expand Down Expand Up @@ -323,6 +326,7 @@ public static function build($paths = array(), $mode = App::PREPEND) {
*
* @param string $plugin CamelCased/lower_cased plugin name to find the path of.
* @return string full path to the plugin.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::pluginPath
*/
public static function pluginPath($plugin) {
return CakePlugin::path($plugin);
Expand All @@ -337,6 +341,7 @@ public static function pluginPath($plugin) {
*
* @param string $theme theme name to find the path of.
* @return string full path to the theme.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::themePath
*/
public static function themePath($theme) {
$themeDir = 'Themed' . DS . Inflector::camelize($theme);
Expand All @@ -357,6 +362,7 @@ public static function themePath($theme) {
*
* @param string $type
* @return string full path to package
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::core
*/
public static function core($type) {
return array(CAKE . str_replace('/', DS, $type) . DS);
Expand All @@ -383,6 +389,7 @@ public static function core($type) {
* @param mixed $path Optional Scan only the path given. If null, paths for the chosen type will be used.
* @param boolean $cache Set to false to rescan objects of the chosen type. Defaults to true.
* @return mixed Either false on incorrect / miss. Or an array of found objects.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::objects
*/
public static function objects($type, $path = null, $cache = true) {
$extension = '/\.php$/';
Expand Down Expand Up @@ -474,6 +481,7 @@ public static function objects($type, $path = null, $cache = true) {
* @param string $className the name of the class to configure package for
* @param string $location the package name
* @return void
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::uses
*/
public static function uses($className, $location) {
self::$_classMap[$className] = $location;
Expand Down Expand Up @@ -540,6 +548,7 @@ public static function load($className) {
*
* @param string $className name of the class to obtain the package name from
* @return string package name or null if not declared
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::location
*/
public static function location($className) {
if (!empty(self::$_classMap[$className])) {
Expand Down Expand Up @@ -781,6 +790,11 @@ protected static function _mapped($name, $plugin = null) {
return false;
}

/**
* Sets then returns the templates for each customizable package path
*
* @return array templates for each customizable package path
*/
protected static function _packageFormat() {
if (empty(self::$_packageFormat)) {
self::$_packageFormat = array(
Expand Down

0 comments on commit dba4d21

Please sign in to comment.