import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -35,7 +35,7 @@ require_once 'Zend/Tool/Project/Context/Content/Engine/Phtml.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -47,17 +47,17 @@ class Zend_Tool_Project_Context_Content_Engine
|
||||
* @var Zend_Tool_Framework_Client_Storage
|
||||
*/
|
||||
protected $_storage = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_keyInStorage = 'project/content';
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_engines = array();
|
||||
|
||||
|
||||
/**
|
||||
* __construct()
|
||||
*
|
||||
@ -71,7 +71,7 @@ class Zend_Tool_Project_Context_Content_Engine
|
||||
new Zend_Tool_Project_Context_Content_Engine_Phtml($storage, $this->_keyInStorage),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContent()
|
||||
*
|
||||
@ -83,24 +83,24 @@ class Zend_Tool_Project_Context_Content_Engine
|
||||
public function getContent(Zend_Tool_Project_Context_Interface $context, $methodName, $parameters)
|
||||
{
|
||||
$content = null;
|
||||
|
||||
|
||||
foreach ($this->_engines as $engine) {
|
||||
if ($engine->hasContent($context, $methodName, $parameters)) {
|
||||
$content = $engine->getContent($context, $methodName, $parameters);
|
||||
|
||||
|
||||
if ($content != null) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($content == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -37,12 +37,12 @@ class Zend_Tool_Project_Context_Content_Engine_CodeGenerator
|
||||
* @var Zend_Tool_Framework_Client_Storage
|
||||
*/
|
||||
protected $_storage = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_contentPrefix = null;
|
||||
|
||||
|
||||
/**
|
||||
* __construct()
|
||||
*
|
||||
@ -54,7 +54,7 @@ class Zend_Tool_Project_Context_Content_Engine_CodeGenerator
|
||||
$this->_storage = $storage;
|
||||
$this->_contentPrefix = $contentPrefix;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hasContent()
|
||||
*
|
||||
@ -66,7 +66,7 @@ class Zend_Tool_Project_Context_Content_Engine_CodeGenerator
|
||||
{
|
||||
return $this->_storage->has($this->_contentPrefix . '/' . $context->getName() . '/' . $method . '.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContent()
|
||||
*
|
||||
@ -78,21 +78,21 @@ class Zend_Tool_Project_Context_Content_Engine_CodeGenerator
|
||||
public function getContent(Zend_Tool_Project_Context_Interface $context, $method, $parameters)
|
||||
{
|
||||
$streamUri = $this->_storage->getStreamUri($this->_contentPrefix . '/' . $context->getName() . '/' . $method . '.php');
|
||||
|
||||
|
||||
if (method_exists($context, 'getCodeGenerator')) {
|
||||
$codeGenerator = $context->getCodeGenerator();
|
||||
} else {
|
||||
$codeGenerator = new Zend_CodeGenerator_Php_File();
|
||||
}
|
||||
|
||||
|
||||
$codeGenerator = include $streamUri;
|
||||
|
||||
|
||||
if (!$codeGenerator instanceof Zend_CodeGenerator_Abstract) {
|
||||
throw new Zend_Tool_Project_Exception('Custom file at ' . $streamUri . ' did not return the $codeGenerator object.');
|
||||
}
|
||||
|
||||
|
||||
return $codeGenerator->generate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -33,17 +33,17 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Content_Engine_Phtml
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Framework_Client_Storage
|
||||
*/
|
||||
protected $_storage = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_contentPrefix = null;
|
||||
|
||||
|
||||
/**
|
||||
* __construct()
|
||||
*
|
||||
@ -55,7 +55,7 @@ class Zend_Tool_Project_Context_Content_Engine_Phtml
|
||||
$this->_storage = $storage;
|
||||
$this->_contentPrefix = $contentPrefix;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hasContext()
|
||||
*
|
||||
@ -67,7 +67,7 @@ class Zend_Tool_Project_Context_Content_Engine_Phtml
|
||||
{
|
||||
return $this->_storage->has($this->_contentPrefix . '/' . $context . '/' . $method . '.phtml');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContent()
|
||||
*
|
||||
@ -78,12 +78,12 @@ class Zend_Tool_Project_Context_Content_Engine_Phtml
|
||||
public function getContent(Zend_Tool_Project_Context_Interface $context, $method, $parameters)
|
||||
{
|
||||
$streamUri = $this->_storage->getStreamUri($this->_contentPrefix . '/' . $context->getName() . '/' . $method . '.phtml');
|
||||
|
||||
|
||||
ob_start();
|
||||
include $streamUri;
|
||||
$content = ob_get_clean();
|
||||
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
require_once 'Zend/Tool/Project/Exception.php';
|
||||
@ -29,5 +29,5 @@ require_once 'Zend/Tool/Project/Exception.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Exception extends Zend_Tool_Project_Exception
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,30 +30,30 @@ require_once 'Zend/Tool/Project/Context/Interface.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Tool_Project_Context_Interface
|
||||
{
|
||||
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Tool_Project_Context_Interface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile_Resource
|
||||
*/
|
||||
protected $_resource = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_baseDirectory = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = null;
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -65,7 +65,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
$this->_baseDirectory = $parentBaseDirectory;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setResource()
|
||||
*
|
||||
@ -77,7 +77,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
$this->_resource = $resource;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setBaseDirectory()
|
||||
*
|
||||
@ -89,7 +89,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
$this->_baseDirectory = rtrim(str_replace('\\', '/', $baseDirectory), '/');
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getBaseDirectory()
|
||||
*
|
||||
@ -99,7 +99,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
{
|
||||
return $this->_baseDirectory;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setFilesystemName()
|
||||
*
|
||||
@ -111,7 +111,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
$this->_filesystemName = $filesystemName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getFilesystemName()
|
||||
*
|
||||
@ -121,7 +121,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
{
|
||||
return $this->_filesystemName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPath()
|
||||
*
|
||||
@ -135,7 +135,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* exists()
|
||||
*
|
||||
@ -145,21 +145,21 @@ abstract class Zend_Tool_Project_Context_Filesystem_Abstract implements Zend_Too
|
||||
{
|
||||
return file_exists($this->getPath());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
* Create this resource/context
|
||||
*
|
||||
*
|
||||
*/
|
||||
abstract public function create();
|
||||
|
||||
/**
|
||||
* delete()
|
||||
*
|
||||
*
|
||||
* Delete this resouce/context
|
||||
*
|
||||
*/
|
||||
abstract public function delete();
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Directory.php 16972 2009-07-22 18:44:24Z ralph $
|
||||
* @version $Id: Directory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,15 +30,15 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Abstract.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_Directory extends Zend_Tool_Project_Context_Filesystem_Abstract
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_Directory extends Zend_Tool_Project_Context_Filesystem_Abstract
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -53,7 +53,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_Directory extends Zend_Tool_
|
||||
$parentResource->create();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!file_exists($this->getPath())) {
|
||||
mkdir($this->getPath());
|
||||
}
|
||||
@ -70,8 +70,8 @@ abstract class Zend_Tool_Project_Context_Filesystem_Directory extends Zend_Tool_
|
||||
{
|
||||
$this->_resource->setDeleted(true);
|
||||
rmdir($this->getPath());
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: File.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: File.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,15 +30,15 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Abstract.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Project_Context_Filesystem_Abstract
|
||||
abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Project_Context_Filesystem_Abstract
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -50,7 +50,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Proje
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setResource()
|
||||
*
|
||||
@ -77,16 +77,16 @@ abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Proje
|
||||
$parentResource->create();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (file_exists($this->getPath())) {
|
||||
// @todo propt user to determine if its ok to overwrite file
|
||||
}
|
||||
|
||||
|
||||
file_put_contents($this->getPath(), $this->getContents());
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* delete()
|
||||
*
|
||||
@ -98,7 +98,7 @@ abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Proje
|
||||
$this->_resource->setDeleted(true);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -108,5 +108,5 @@ abstract class Zend_Tool_Project_Context_Filesystem_File extends Zend_Tool_Proje
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,12 +16,12 @@
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Interface.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Interface for contexts
|
||||
*
|
||||
*
|
||||
* setResource() is an optional method that if the context supports
|
||||
* will be set with the resource at construction time
|
||||
*
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
interface Zend_Tool_Project_Context_Interface
|
||||
{
|
||||
|
||||
|
||||
public function getName();
|
||||
|
||||
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Repository.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Repository.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
require_once 'Zend/Tool/Project/Context/System/Interface.php';
|
||||
@ -31,13 +31,13 @@ require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Repository implements Countable
|
||||
{
|
||||
|
||||
|
||||
protected static $_instance = null;
|
||||
protected static $_isInitialized = false;
|
||||
|
||||
|
||||
protected $_shortContextNames = array();
|
||||
protected $_contexts = array();
|
||||
|
||||
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
@ -48,16 +48,16 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
if (self::$_instance == null) {
|
||||
self::$_instance = new self();
|
||||
}
|
||||
|
||||
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
|
||||
public static function resetInstance()
|
||||
{
|
||||
self::$_instance = null;
|
||||
self::$_isInitialized = false;
|
||||
}
|
||||
|
||||
|
||||
protected function __construct()
|
||||
{
|
||||
if (self::$_isInitialized == false) {
|
||||
@ -67,7 +67,7 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
self::$_isInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function addContextsFromDirectory($directory, $prefix)
|
||||
{
|
||||
$prefix = trim($prefix, '_') . '_';
|
||||
@ -79,8 +79,8 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
$this->addContextClass($class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function addContextClass($contextClass)
|
||||
{
|
||||
if (!class_exists($contextClass)) {
|
||||
@ -90,7 +90,7 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
$context = new $contextClass();
|
||||
return $this->addContext($context);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enter description here...
|
||||
*
|
||||
@ -102,16 +102,16 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
$isSystem = ($context instanceof Zend_Tool_Project_Context_System_Interface);
|
||||
$isTopLevel = ($context instanceof Zend_Tool_Project_Context_System_TopLevelRestrictable);
|
||||
$isOverwritable = !($context instanceof Zend_Tool_Project_Context_System_NotOverwritable);
|
||||
|
||||
|
||||
$index = (count($this->_contexts)) ? max(array_keys($this->_contexts)) + 1 : 1;
|
||||
|
||||
|
||||
$normalName = $this->_normalizeName($context->getName());
|
||||
|
||||
|
||||
if (isset($this->_shortContextNames[$normalName]) && ($this->_contexts[$this->_shortContextNames[$normalName]]['isOverwritable'] === false) ) {
|
||||
require_once 'Zend/Tool/Project/Context/Exception.php';
|
||||
throw new Zend_Tool_Project_Context_Exception('Context ' . $context->getName() . ' is not overwriteable.');
|
||||
}
|
||||
|
||||
|
||||
$this->_shortContextNames[$normalName] = $index;
|
||||
$this->_contexts[$index] = array(
|
||||
'isTopLevel' => $isTopLevel,
|
||||
@ -120,38 +120,38 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
'normalName' => $normalName,
|
||||
'context' => $context
|
||||
);
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function getContext($name)
|
||||
{
|
||||
{
|
||||
if (!$this->hasContext($name)) {
|
||||
require_once 'Zend/Tool/Project/Context/Exception.php';
|
||||
throw new Zend_Tool_Project_Context_Exception('Context by name ' . $name . ' does not exist in the registry.');
|
||||
}
|
||||
|
||||
|
||||
$name = $this->_normalizeName($name);
|
||||
return clone $this->_contexts[$this->_shortContextNames[$name]]['context'];
|
||||
}
|
||||
|
||||
|
||||
public function hasContext($name)
|
||||
{
|
||||
$name = $this->_normalizeName($name);
|
||||
return (isset($this->_shortContextNames[$name]) ? true : false);
|
||||
}
|
||||
|
||||
|
||||
public function isSystemContext($name)
|
||||
{
|
||||
if (!$this->hasContext($name)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$name = $this->_normalizeName($name);
|
||||
$index = $this->_shortContextNames[$name];
|
||||
return $this->_contexts[$index]['isSystemContext'];
|
||||
}
|
||||
|
||||
|
||||
public function isTopLevelContext($name)
|
||||
{
|
||||
if (!$this->hasContext($name)) {
|
||||
@ -161,7 +161,7 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
$index = $this->_shortContextNames[$name];
|
||||
return $this->_contexts[$index]['isTopLevel'];
|
||||
}
|
||||
|
||||
|
||||
public function isOverwritableContext($name)
|
||||
{
|
||||
if (!$this->hasContext($name)) {
|
||||
@ -171,15 +171,15 @@ class Zend_Tool_Project_Context_Repository implements Countable
|
||||
$index = $this->_shortContextNames[$name];
|
||||
return $this->_contexts[$index]['isOverwritable'];
|
||||
}
|
||||
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->_contexts);
|
||||
}
|
||||
|
||||
|
||||
protected function _normalizeName($name)
|
||||
{
|
||||
return strtolower($name);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Interface.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: NotOverwritable.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: NotOverwritable.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ProjectDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ProjectDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -45,24 +45,24 @@ require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_System_ProjectDirectory
|
||||
class Zend_Tool_Project_Context_System_ProjectDirectory
|
||||
extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
implements Zend_Tool_Project_Context_System_Interface,
|
||||
Zend_Tool_Project_Context_System_NotOverwritable,
|
||||
Zend_Tool_Project_Context_System_TopLevelRestrictable
|
||||
Zend_Tool_Project_Context_System_TopLevelRestrictable
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = null;
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -72,7 +72,7 @@ class Zend_Tool_Project_Context_System_ProjectDirectory
|
||||
{
|
||||
return 'ProjectDirectory';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -82,22 +82,22 @@ class Zend_Tool_Project_Context_System_ProjectDirectory
|
||||
{
|
||||
// get base path from attributes (would be in path attribute)
|
||||
$projectDirectory = $this->_resource->getAttribute('path');
|
||||
|
||||
|
||||
// if not, get from profile
|
||||
if ($projectDirectory == null) {
|
||||
$projectDirectory = $this->_resource->getProfile()->getAttribute('projectDirectory');
|
||||
}
|
||||
|
||||
|
||||
// if not, exception.
|
||||
if ($projectDirectory == null) {
|
||||
require_once 'Zend/Tool/Project/Exception.php';
|
||||
throw new Zend_Tool_Project_Exception('projectDirectory cannot find the directory for this project.');
|
||||
}
|
||||
|
||||
|
||||
$this->_baseDirectory = rtrim($projectDirectory, '\\/');
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -120,9 +120,9 @@ class Zend_Tool_Project_Context_System_ProjectDirectory
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
parent::create();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ProjectProfileFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ProjectProfileFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -45,13 +45,13 @@ require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
extends Zend_Tool_Project_Context_Filesystem_File
|
||||
implements Zend_Tool_Project_Context_System_Interface,
|
||||
Zend_Tool_Project_Context_System_NotOverwritable
|
||||
@ -61,12 +61,12 @@ class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = '.zfproject.xml';
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile
|
||||
*/
|
||||
protected $_profile = null;
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -76,7 +76,7 @@ class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
{
|
||||
return 'ProjectProfileFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setProfile()
|
||||
*
|
||||
@ -88,10 +88,10 @@ class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
$this->_profile = $profile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* save()
|
||||
*
|
||||
* save()
|
||||
*
|
||||
* Proxy to create
|
||||
*
|
||||
* @return Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
@ -101,7 +101,7 @@ class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
parent::create();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -114,5 +114,5 @@ class Zend_Tool_Project_Context_System_ProjectProfileFile
|
||||
$xml = $parser->serialize($profile);
|
||||
return $xml;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ProjectProvidersDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ProjectProvidersDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -40,23 +40,23 @@ require_once 'Zend/Tool/Project/Context/System/NotOverwritable.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_System_ProjectProvidersDirectory
|
||||
class Zend_Tool_Project_Context_System_ProjectProvidersDirectory
|
||||
extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
implements Zend_Tool_Project_Context_System_Interface,
|
||||
Zend_Tool_Project_Context_System_NotOverwritable
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'providers';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -66,7 +66,7 @@ class Zend_Tool_Project_Context_System_ProjectProvidersDirectory
|
||||
{
|
||||
return 'ProjectProvidersDirectory';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -75,7 +75,7 @@ class Zend_Tool_Project_Context_System_ProjectProvidersDirectory
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
|
||||
if (file_exists($this->getPath())) {
|
||||
|
||||
foreach (new DirectoryIterator($this->getPath()) as $item) {
|
||||
@ -83,15 +83,15 @@ class Zend_Tool_Project_Context_System_ProjectProvidersDirectory
|
||||
$loadableFiles[] = $item->getPathname();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($loadableFiles) {
|
||||
|
||||
|
||||
// @todo process and add the files to the system for usage.
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TopLevelRestrictable.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TopLevelRestrictable.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -33,5 +33,5 @@
|
||||
*/
|
||||
interface Zend_Tool_Project_Context_System_TopLevelRestrictable
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ActionMethod.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ActionMethod.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -35,25 +35,25 @@ require_once 'Zend/Reflection/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Context_Interface
|
||||
class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Context_Interface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile_Resource
|
||||
*/
|
||||
protected $_resource = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile_Resource
|
||||
*/
|
||||
protected $_controllerResource = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -63,7 +63,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
* @var string
|
||||
*/
|
||||
protected $_actionName = null;
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -72,7 +72,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
public function init()
|
||||
{
|
||||
$this->_actionName = $this->_resource->getAttribute('actionName');
|
||||
|
||||
|
||||
$this->_resource->setAppendable(false);
|
||||
$this->_controllerResource = $this->_resource->getParentResource();
|
||||
if (!$this->_controllerResource->getContext() instanceof Zend_Tool_Project_Context_Zf_ControllerFile) {
|
||||
@ -81,9 +81,9 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
}
|
||||
// make the ControllerFile node appendable so we can tack on the actionMethod.
|
||||
$this->_resource->getParentResource()->setAppendable(true);
|
||||
|
||||
|
||||
$this->_controllerPath = $this->_controllerResource->getContext()->getPath();
|
||||
|
||||
|
||||
/*
|
||||
* This code block is now commented, its doing to much for init()
|
||||
*
|
||||
@ -92,10 +92,10 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
throw new Zend_Tool_Project_Context_Exception('An action named ' . $this->_actionName . 'Action already exists in this controller');
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes
|
||||
*
|
||||
@ -107,7 +107,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
'actionName' => $this->getActionName()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -117,7 +117,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
{
|
||||
return 'ActionMethod';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setResource()
|
||||
*
|
||||
@ -129,7 +129,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
$this->_resource = $resource;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setActionName()
|
||||
*
|
||||
@ -141,7 +141,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
$this->_actionName = $actionName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getActionName()
|
||||
*
|
||||
@ -151,7 +151,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
{
|
||||
return $this->_actionName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -162,13 +162,13 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
if (self::createActionMethod($this->_controllerPath, $this->_actionName) === false) {
|
||||
require_once 'Zend/Tool/Project/Context/Exception.php';
|
||||
throw new Zend_Tool_Project_Context_Exception(
|
||||
'Could not create action within controller ' . $this->_controllerPath
|
||||
'Could not create action within controller ' . $this->_controllerPath
|
||||
. ' with action name ' . $this->_actionName
|
||||
);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* delete()
|
||||
*
|
||||
@ -179,7 +179,7 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
// @todo do this
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createAcionMethod()
|
||||
*
|
||||
@ -193,17 +193,17 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
if (!file_exists($controllerPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$controllerCodeGenFile = Zend_CodeGenerator_Php_File::fromReflectedFileName($controllerPath, true, true);
|
||||
$controllerCodeGenFile->getClass()->setMethod(array(
|
||||
'name' => $actionName . 'Action',
|
||||
'body' => $body
|
||||
));
|
||||
|
||||
|
||||
file_put_contents($controllerPath, $controllerCodeGenFile->generate());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hasActionMethod()
|
||||
*
|
||||
@ -216,9 +216,9 @@ class Zend_Tool_Project_Context_Zf_ActionMethod implements Zend_Tool_Project_Con
|
||||
if (!file_exists($controllerPath)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$controllerCodeGenFile = Zend_CodeGenerator_Php_File::fromReflectedFileName($controllerPath, true, true);
|
||||
return $controllerCodeGenFile->getClass()->hasMethod($actionName . 'Action');
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ApisDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ApisDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ApisDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ApisDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'apis';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ApisDirectory extends Zend_Tool_Project_Conte
|
||||
{
|
||||
return 'ApisDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ApplicationConfigFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ApplicationConfigFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ApplicationConfigFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'application.ini';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_ApplicationConfigFile extends Zend_Tool_Proje
|
||||
{
|
||||
return 'ApplicationConfigFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -65,7 +65,7 @@ class Zend_Tool_Project_Context_Zf_ApplicationConfigFile extends Zend_Tool_Proje
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes()
|
||||
*
|
||||
@ -75,7 +75,7 @@ class Zend_Tool_Project_Context_Zf_ApplicationConfigFile extends Zend_Tool_Proje
|
||||
{
|
||||
return array('type' => $this->_type);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -104,5 +104,5 @@ phpSettings.display_errors = 1
|
||||
EOS;
|
||||
return $contents;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ApplicationDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ApplicationDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
protected $_filesystemName = 'application';
|
||||
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return 'ApplicationDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: BootstrapFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: BootstrapFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -32,23 +32,23 @@ require_once 'Zend/Application.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'Bootstrap.php';
|
||||
|
||||
|
||||
protected $_applicationInstance = null;
|
||||
protected $_bootstrapInstance = null;
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -58,30 +58,30 @@ class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Conte
|
||||
{
|
||||
return 'BootstrapFile';
|
||||
}
|
||||
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
|
||||
$applicationConfigFile = $this->_resource->getProfile()->search('ApplicationConfigFile');
|
||||
$applicationDirectory = $this->_resource->getProfile()->search('ApplicationDirectory');
|
||||
|
||||
|
||||
if (($applicationConfigFile === false) || ($applicationDirectory === false)) {
|
||||
throw new Exception('To use the BootstrapFile context, your project requires the use of both the "ApplicationConfigFile" and "ApplicationDirectory" contexts.');
|
||||
}
|
||||
|
||||
|
||||
if ($applicationConfigFile->getContext()->exists()) {
|
||||
define('APPLICATION_PATH', $applicationDirectory->getPath());
|
||||
$applicationOptions = array();
|
||||
$applicationOptions['config'] = $applicationConfigFile->getPath();
|
||||
|
||||
|
||||
$this->_applicationInstance = new Zend_Application(
|
||||
'development',
|
||||
$applicationOptions
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -97,7 +97,7 @@ class Zend_Tool_Project_Context_Zf_BootstrapFile extends Zend_Tool_Project_Conte
|
||||
)),
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
return $codeGenFile->generate();
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: CacheDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: CacheDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_CacheDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_CacheDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'cache';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_CacheDirectory extends Zend_Tool_Project_Cont
|
||||
{
|
||||
return 'CacheDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ConfigFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ConfigFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ConfigFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_ConfigFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'bootstrap.php';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_ConfigFile extends Zend_Tool_Project_Context_
|
||||
{
|
||||
return 'ConfigFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -63,5 +63,5 @@ class Zend_Tool_Project_Context_Zf_ConfigFile extends Zend_Tool_Project_Context_
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ConfigsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ConfigsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ConfigsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ConfigsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'configs';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ConfigsDirectory extends Zend_Tool_Project_Co
|
||||
{
|
||||
return 'ConfigsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ControllerFile.php 16972 2009-07-22 18:44:24Z ralph $
|
||||
* @version $Id: ControllerFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -40,25 +40,25 @@ require_once 'Zend/Filter/Word/DashToCamelCase.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_controllerName = 'index';
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'controllerName';
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -71,7 +71,7 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes
|
||||
*
|
||||
@ -83,7 +83,7 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
'controllerName' => $this->getControllerName()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -93,7 +93,7 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
{
|
||||
return 'ControllerFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getControllerName()
|
||||
*
|
||||
@ -103,7 +103,7 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
{
|
||||
return $this->_controllerName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -113,9 +113,9 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
{
|
||||
|
||||
$filter = new Zend_Filter_Word_DashToCamelCase();
|
||||
|
||||
|
||||
$className = $filter->filter($this->_controllerName) . 'Controller';
|
||||
|
||||
|
||||
$codeGenFile = new Zend_CodeGenerator_Php_File(array(
|
||||
'fileName' => $this->getPath(),
|
||||
'classes' => array(
|
||||
@ -131,10 +131,10 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
))
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
|
||||
if ($className == 'ErrorController') {
|
||||
|
||||
|
||||
$codeGenFile = new Zend_CodeGenerator_Php_File(array(
|
||||
'fileName' => $this->getPath(),
|
||||
'classes' => array(
|
||||
@ -147,7 +147,7 @@ class Zend_Tool_Project_Context_Zf_ControllerFile extends Zend_Tool_Project_Cont
|
||||
'body' => <<<EOS
|
||||
\$errors = \$this->_getParam('error_handler');
|
||||
|
||||
switch (\$errors->type) {
|
||||
switch (\$errors->type) {
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
|
||||
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
|
||||
|
||||
@ -156,7 +156,7 @@ switch (\$errors->type) {
|
||||
\$this->view->message = 'Page not found';
|
||||
break;
|
||||
default:
|
||||
// application error
|
||||
// application error
|
||||
\$this->getResponse()->setHttpResponseCode(500);
|
||||
\$this->view->message = 'Application error';
|
||||
break;
|
||||
@ -172,12 +172,12 @@ EOS
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
// store the generator into the registry so that the addAction command can use the same object later
|
||||
Zend_CodeGenerator_Php_File::registerFileCodeGenerator($codeGenFile); // REQUIRES filename to be set
|
||||
return $codeGenFile->generate();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* addAction()
|
||||
*
|
||||
@ -189,7 +189,7 @@ EOS
|
||||
$class->setMethod(array('name' => $actionName . 'Action', 'body' => ' // action body here'));
|
||||
file_put_contents($this->getPath(), $codeGenFile->generate());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getCodeGenerator()
|
||||
*
|
||||
@ -202,5 +202,5 @@ EOS
|
||||
$class = array_shift($codeGenFileClasses);
|
||||
return $class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ControllersDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ControllersDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ControllersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'controllers';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ControllersDirectory extends Zend_Tool_Projec
|
||||
{
|
||||
return 'ControllersDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DataDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: DataDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_DataDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_DataDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'data';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_DataDirectory extends Zend_Tool_Project_Conte
|
||||
{
|
||||
return 'DataDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DbTableDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: DbTableDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -43,7 +43,7 @@ class Zend_Tool_Project_Context_Zf_DbTableDirectory extends Zend_Tool_Project_Co
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'DbTable';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DbTableFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: DbTableFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,7 +38,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_DbTableFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -48,7 +48,7 @@ class Zend_Tool_Project_Context_Zf_DbTableFile extends Zend_Tool_Project_Context
|
||||
{
|
||||
return 'DbTableFile';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
protected $_dbTableName;
|
||||
|
||||
@ -68,5 +68,5 @@ class Zend_Tool_Project_Context_Zf_DbTableFile extends Zend_Tool_Project_Context
|
||||
return $this->_dbTableName;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: FormFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: FormFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,7 +38,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_FormFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -48,5 +48,5 @@ class Zend_Tool_Project_Context_Zf_FormFile extends Zend_Tool_Project_Context_Fi
|
||||
{
|
||||
return 'FormFile';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: FormsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: FormsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -43,7 +43,7 @@ class Zend_Tool_Project_Context_Zf_FormsDirectory extends Zend_Tool_Project_Cont
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'forms';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: HtaccessFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: HtaccessFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_HtaccessFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_HtaccessFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = '.htaccess';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_HtaccessFile extends Zend_Tool_Project_Contex
|
||||
{
|
||||
return 'HtaccessFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -74,5 +74,5 @@ RewriteRule ^.*$ index.php [NC,L]
|
||||
EOS;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: LayoutsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: LayoutsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_LayoutsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_LayoutsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'layouts';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_LayoutsDirectory extends Zend_Tool_Project_Co
|
||||
{
|
||||
return 'LayoutsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: LibraryDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: LibraryDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,28 +30,28 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_LibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_LibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'library';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'LibraryDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: LocalesDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: LocalesDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_LocalesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_LocalesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'locales';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_LocalesDirectory extends Zend_Tool_Project_Co
|
||||
{
|
||||
return 'LocalesDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: LogsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: LogsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_LogsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_LogsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'logs';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_LogsDirectory extends Zend_Tool_Project_Conte
|
||||
{
|
||||
return 'LogsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ModelFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ModelFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,7 +38,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ModelFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -48,5 +48,5 @@ class Zend_Tool_Project_Context_Zf_ModelFile extends Zend_Tool_Project_Context_F
|
||||
{
|
||||
return 'ModelFile';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ModelsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ModelsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ModelsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ModelsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'models';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ModelsDirectory extends Zend_Tool_Project_Con
|
||||
{
|
||||
return 'ModelsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ModuleDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ModuleDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,25 +30,25 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_moduleName = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'moduleDirectory';
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -60,7 +60,7 @@ class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Con
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -70,7 +70,7 @@ class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Con
|
||||
{
|
||||
return 'ModuleDirectory';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes
|
||||
*
|
||||
@ -82,7 +82,7 @@ class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Con
|
||||
'moduleName' => $this->getModuleName()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getModuleName()
|
||||
*
|
||||
@ -92,6 +92,6 @@ class Zend_Tool_Project_Context_Zf_ModuleDirectory extends Zend_Tool_Project_Con
|
||||
{
|
||||
return $this->_moduleName;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ModulesDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ModulesDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ModulesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ModulesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'modules';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ModulesDirectory extends Zend_Tool_Project_Co
|
||||
{
|
||||
return 'ModulesDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ProjectProviderFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ProjectProviderFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -35,25 +35,25 @@ require_once 'Zend/CodeGenerator/Php/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_projectProviderName = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_actionNames = array();
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -61,11 +61,11 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
|
||||
|
||||
$this->_projectProviderName = $this->_resource->getAttribute('projectProviderName');
|
||||
$this->_actionNames = $this->_resource->getAttribute('actionNames');
|
||||
$this->_filesystemName = ucfirst($this->_projectProviderName) . 'Provider.php';
|
||||
|
||||
|
||||
if (strpos($this->_actionNames, ',')) {
|
||||
$this->_actionNames = explode(',', $this->_actionNames);
|
||||
} else {
|
||||
@ -75,7 +75,7 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes()
|
||||
*
|
||||
@ -88,7 +88,7 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
'actionNames' => implode(',', $this->_actionNames)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -98,7 +98,7 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
{
|
||||
return 'ProjectProviderFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getProjectProviderName()
|
||||
*
|
||||
@ -118,14 +118,14 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
{
|
||||
|
||||
$filter = new Zend_Filter_Word_DashToCamelCase();
|
||||
|
||||
|
||||
$className = $filter->filter($this->_projectProviderName) . 'Provider';
|
||||
|
||||
|
||||
$class = new Zend_CodeGenerator_Php_Class(array(
|
||||
'name' => $className,
|
||||
'extendedClass' => 'Zend_Tool_Project_Provider_Abstract'
|
||||
));
|
||||
|
||||
|
||||
$methods = array();
|
||||
foreach ($this->_actionNames as $actionName) {
|
||||
$methods[] = new Zend_CodeGenerator_Php_Method(array(
|
||||
@ -133,11 +133,11 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
'body' => ' /** @todo Implementation */'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
if ($methods) {
|
||||
$class->setMethods($methods);
|
||||
}
|
||||
|
||||
|
||||
$codeGenFile = new Zend_CodeGenerator_Php_File(array(
|
||||
'requiredFiles' => array(
|
||||
'Zend/Tool/Project/Provider/Abstract.php',
|
||||
@ -145,8 +145,8 @@ class Zend_Tool_Project_Context_Zf_ProjectProviderFile extends Zend_Tool_Project
|
||||
),
|
||||
'classes' => array($class)
|
||||
));
|
||||
|
||||
|
||||
return $codeGenFile->generate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: PublicDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: PublicDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_PublicDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'public';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_PublicDirectory extends Zend_Tool_Project_Con
|
||||
{
|
||||
return 'PublicDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: PublicImagesDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: PublicImagesDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_PublicImagesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_PublicImagesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'images';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_PublicImagesDirectory extends Zend_Tool_Proje
|
||||
{
|
||||
return 'PublicImagesDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: PublicIndexFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: PublicIndexFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_PublicIndexFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
class Zend_Tool_Project_Context_Zf_PublicIndexFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'index.php';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_PublicIndexFile extends Zend_Tool_Project_Con
|
||||
{
|
||||
return 'PublicIndexFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -78,11 +78,11 @@ set_include_path(implode(PATH_SEPARATOR, array(
|
||||
)));
|
||||
|
||||
/** Zend_Application */
|
||||
require_once 'Zend/Application.php';
|
||||
require_once 'Zend/Application.php';
|
||||
|
||||
// Create application, bootstrap, and run
|
||||
\$application = new Zend_Application(
|
||||
APPLICATION_ENV,
|
||||
APPLICATION_ENV,
|
||||
APPLICATION_PATH . '/configs/application.ini'
|
||||
);
|
||||
\$application->bootstrap()
|
||||
@ -91,5 +91,5 @@ EOS
|
||||
));
|
||||
return $codeGenerator->generate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: PublicScriptsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: PublicScriptsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_PublicScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_PublicScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'js';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_PublicScriptsDirectory extends Zend_Tool_Proj
|
||||
{
|
||||
return 'PublicScriptsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: PublicStylesheetsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: PublicStylesheetsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_PublicStylesheetsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_PublicStylesheetsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'styles';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_PublicStylesheetsDirectory extends Zend_Tool_
|
||||
{
|
||||
return 'PublicStylesheetsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: SearchIndexesDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: SearchIndexesDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_SearchIndexesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_SearchIndexesDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'search-indexes';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_SearchIndexesDirectory extends Zend_Tool_Proj
|
||||
{
|
||||
return 'SearchIndexesDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: SessionsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: SessionsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_SessionsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_SessionsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'sessions';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_SessionsDirectory extends Zend_Tool_Project_C
|
||||
{
|
||||
return 'SessionsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TemporaryDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TemporaryDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TemporaryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TemporaryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'temp';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TemporaryDirectory extends Zend_Tool_Project_
|
||||
{
|
||||
return 'TemporaryDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestApplicationBootstrapFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestApplicationBootstrapFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationBootstrapFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'bootstrap.php';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestApplicationBootstrapFile extends Zend_Too
|
||||
{
|
||||
return 'TestApplicationBootstrapFile';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestApplicationControllerDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestApplicationControllerDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationControllerDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationControllerDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'controllers';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestApplicationControllerDirectory extends Ze
|
||||
{
|
||||
return 'TestApplicationControllerDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestApplicationControllerFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestApplicationControllerFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_forControllerName = '';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_To
|
||||
{
|
||||
return 'TestApplicationControllerFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -66,7 +66,7 @@ class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_To
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -76,9 +76,9 @@ class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_To
|
||||
{
|
||||
|
||||
$filter = new Zend_Filter_Word_DashToCamelCase();
|
||||
|
||||
|
||||
$className = $filter->filter($this->_forControllerName) . 'ControllerTest';
|
||||
|
||||
|
||||
$codeGenFile = new Zend_CodeGenerator_Php_File(array(
|
||||
'requiredFiles' => array(
|
||||
'PHPUnit/Framework/TestCase.php'
|
||||
@ -103,5 +103,5 @@ class Zend_Tool_Project_Context_Zf_TestApplicationControllerFile extends Zend_To
|
||||
|
||||
return $codeGenFile->generate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestApplicationDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestApplicationDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TestApplicationDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'application';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestApplicationDirectory extends Zend_Tool_Pr
|
||||
{
|
||||
return 'TestApplicationDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestLibraryBootstrapFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestLibraryBootstrapFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryBootstrapFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'bootstrap.php';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestLibraryBootstrapFile extends Zend_Tool_Pr
|
||||
{
|
||||
return 'TestLibraryBootstrapFile';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestLibraryDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestLibraryDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,15 +30,15 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestLibraryDirectory extends Zend_Tool_Projec
|
||||
{
|
||||
return 'TestLibraryDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestLibraryFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestLibraryFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_forClassName = '';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Con
|
||||
{
|
||||
return 'TestLibraryFile';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -66,7 +66,7 @@ class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Con
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getContents()
|
||||
*
|
||||
@ -76,9 +76,9 @@ class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Con
|
||||
{
|
||||
|
||||
$filter = new Zend_Filter_Word_DashToCamelCase();
|
||||
|
||||
|
||||
$className = $filter->filter($this->_forClassName) . 'Test';
|
||||
|
||||
|
||||
$codeGenFile = new Zend_CodeGenerator_Php_File(array(
|
||||
'requiredFiles' => array(
|
||||
'PHPUnit/Framework/TestCase.php'
|
||||
@ -103,5 +103,5 @@ class Zend_Tool_Project_Context_Zf_TestLibraryFile extends Zend_Tool_Project_Con
|
||||
|
||||
return $codeGenFile->generate();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestLibraryNamespaceDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestLibraryNamespaceDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_namespaceName = '';
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -58,7 +58,7 @@ class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_To
|
||||
{
|
||||
return 'TestLibraryNamespaceDirectory';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -71,7 +71,7 @@ class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_To
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes()
|
||||
*
|
||||
@ -80,9 +80,9 @@ class Zend_Tool_Project_Context_Zf_TestLibraryNamespaceDirectory extends Zend_To
|
||||
public function getPersistentAttributes()
|
||||
{
|
||||
$attributes = array();
|
||||
$attributes['namespaceName'] = $this->_namespaceName;
|
||||
|
||||
$attributes['namespaceName'] = $this->_namespaceName;
|
||||
|
||||
return $attributes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestPHPUnitConfigFile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestPHPUnitConfigFile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/File.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestPHPUnitConfigFile extends Zend_Tool_Project_Context_Filesystem_File
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'phpunit.xml';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestPHPUnitConfigFile extends Zend_Tool_Proje
|
||||
{
|
||||
return 'TestPHPUnitConfigFile';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: TestsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: TestsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_TestsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_TestsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'tests';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_TestsDirectory extends Zend_Tool_Project_Cont
|
||||
{
|
||||
return 'TestsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: UploadsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: UploadsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_UploadsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_UploadsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'uploads';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_UploadsDirectory extends Zend_Tool_Project_Co
|
||||
{
|
||||
return 'UploadsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewControllerScriptsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ViewControllerScriptsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,7 +38,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -48,7 +48,7 @@ class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_T
|
||||
* @var name
|
||||
*/
|
||||
protected $_forControllerName = null;
|
||||
|
||||
|
||||
/**
|
||||
* init()
|
||||
*
|
||||
@ -61,7 +61,7 @@ class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_T
|
||||
parent::init();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPersistentAttributes()
|
||||
*
|
||||
@ -73,7 +73,7 @@ class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_T
|
||||
'forControllerName' => $this->_forControllerName
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -83,5 +83,5 @@ class Zend_Tool_Project_Context_Zf_ViewControllerScriptsDirectory extends Zend_T
|
||||
{
|
||||
return 'ViewControllerScriptsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewFiltersDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ViewFiltersDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ViewFiltersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'filters';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ViewFiltersDirectory extends Zend_Tool_Projec
|
||||
{
|
||||
return 'ViewFiltersDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewHelpersDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ViewHelpersDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ViewHelpersDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'helpers';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ViewHelpersDirectory extends Zend_Tool_Projec
|
||||
{
|
||||
return 'ViewHelpersDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewScriptsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ViewScriptsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ViewScriptsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'scripts';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ViewScriptsDirectory extends Zend_Tool_Projec
|
||||
{
|
||||
return 'ViewScriptsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ViewsDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ViewsDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -38,12 +38,12 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ViewsDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'views';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,5 +53,5 @@ class Zend_Tool_Project_Context_Zf_ViewsDirectory extends Zend_Tool_Project_Cont
|
||||
{
|
||||
return 'ViewsDirectory';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ZfStandardLibraryDirectory.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ZfStandardLibraryDirectory.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -30,20 +30,20 @@ require_once 'Zend/Tool/Project/Context/Filesystem/Directory.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_Project_Context_Filesystem_Directory
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $_filesystemName = 'Zend';
|
||||
|
||||
|
||||
/**
|
||||
* getName()
|
||||
*
|
||||
@ -53,7 +53,7 @@ class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_
|
||||
{
|
||||
return 'ZfStandardLibraryDirectory';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -69,17 +69,17 @@ class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_
|
||||
if (strpos($relativePath, DIRECTORY_SEPARATOR . '.') !== false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if ($file->isDir()) {
|
||||
mkdir($this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
|
||||
} else {
|
||||
copy($file->getPathname(), $this->getBaseDirectory() . DIRECTORY_SEPARATOR . $this->getFilesystemName() . $relativePath);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _getZfPath()
|
||||
*
|
||||
@ -88,17 +88,17 @@ class Zend_Tool_Project_Context_Zf_ZfStandardLibraryDirectory extends Zend_Tool_
|
||||
protected function _getZfPath()
|
||||
{
|
||||
foreach (explode(PATH_SEPARATOR, get_include_path()) as $includePath) {
|
||||
|
||||
|
||||
if (!file_exists($includePath) || $includePath[0] == '.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (realpath($checkedPath = rtrim($includePath, '\\/') . '/Zend/Loader.php') !== false && file_exists($checkedPath)) {
|
||||
return dirname($checkedPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,5 +33,5 @@ require_once 'Zend/Exception.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Exception extends Zend_Exception
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Profile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Profile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -35,7 +35,7 @@ require_once 'Zend/Tool/Project/Profile/Resource/Container.php';
|
||||
*
|
||||
* A profile is a hierarchical set of resources that keep track of
|
||||
* items within a specific project.
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -96,7 +96,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
}
|
||||
|
||||
/**
|
||||
* loadFromData() - Load a profile from data provided by the
|
||||
* loadFromData() - Load a profile from data provided by the
|
||||
* 'profilData' attribute
|
||||
*
|
||||
*/
|
||||
@ -114,8 +114,8 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
}
|
||||
|
||||
/**
|
||||
* isLoadableFromFile() - can a profile be loaded from a file
|
||||
*
|
||||
* 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'
|
||||
@ -145,7 +145,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
|
||||
/**
|
||||
* 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'
|
||||
@ -188,7 +188,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
*
|
||||
* This will store the profile in memory to a place on disk determined by the attributes
|
||||
* available, specifically if the key 'projectProfileFile' is available
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function storeToFile()
|
||||
{
|
||||
@ -209,7 +209,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
}
|
||||
|
||||
/**
|
||||
* storeToData() - create a string representation of the profile in memory
|
||||
* storeToData() - create a string representation of the profile in memory
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -219,7 +219,7 @@ class Zend_Tool_Project_Profile extends Zend_Tool_Project_Profile_Resource_Conta
|
||||
$xml = $parser->serialize($this);
|
||||
return $xml;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* __toString() - cast this profile to string to be able to view it.
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,5 +33,5 @@ require_once 'Zend/Tool/Project/Exception.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Exception extends Zend_Tool_Project_Exception
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Interface.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Interface.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,21 +28,21 @@
|
||||
*/
|
||||
interface Zend_Tool_Project_Profile_FileParser_Interface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* serialize()
|
||||
*
|
||||
*
|
||||
* This method should take a profile and return a string
|
||||
* representation of it.
|
||||
*
|
||||
*
|
||||
* @param Zend_Tool_Project_Profile $profile
|
||||
* @return string
|
||||
*/
|
||||
public function serialize(Zend_Tool_Project_Profile $profile);
|
||||
|
||||
|
||||
/**
|
||||
* unserialize()
|
||||
*
|
||||
*
|
||||
* This method should be able to take string data an create a
|
||||
* struture in the provided $profile
|
||||
*
|
||||
@ -50,5 +50,5 @@ interface Zend_Tool_Project_Profile_FileParser_Interface
|
||||
* @param Zend_Tool_Project_Profile $profile
|
||||
*/
|
||||
public function unserialize($data, Zend_Tool_Project_Profile $profile);
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Xml.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Xml.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
require_once 'Zend/Tool/Project/Profile/FileParser/Interface.php';
|
||||
@ -33,12 +33,12 @@ require_once 'Zend/Tool/Project/Profile/Resource.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Profile_FileParser_Interface
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile
|
||||
*/
|
||||
protected $_profile = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Context_Repository
|
||||
*/
|
||||
@ -52,10 +52,10 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
{
|
||||
$this->_contextRepository = Zend_Tool_Project_Context_Repository::getInstance();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* serialize()
|
||||
*
|
||||
*
|
||||
* create an xml string from the provided profile
|
||||
*
|
||||
* @param Zend_Tool_Project_Profile $profile
|
||||
@ -65,27 +65,27 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
{
|
||||
|
||||
$profile = clone $profile;
|
||||
|
||||
|
||||
$this->_profile = $profile;
|
||||
$xmlElement = new SimpleXMLElement('<projectProfile />');
|
||||
|
||||
self::_serializeRecurser($profile, $xmlElement);
|
||||
|
||||
self::_serializeRecurser($profile, $xmlElement);
|
||||
|
||||
$doc = new DOMDocument('1.0');
|
||||
$doc->formatOutput = true;
|
||||
$domnode = dom_import_simplexml($xmlElement);
|
||||
$domnode = $doc->importNode($domnode, true);
|
||||
$domnode = $doc->appendChild($domnode);
|
||||
|
||||
|
||||
return $doc->saveXML();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* unserialize()
|
||||
*
|
||||
* unserialize()
|
||||
*
|
||||
* Create a structure in the object $profile from the structure specficied
|
||||
* in the xml string provided
|
||||
*
|
||||
*
|
||||
* @param string xml data
|
||||
* @param Zend_Tool_Project_Profile The profile to use as the top node
|
||||
* @return Zend_Tool_Project_Profile
|
||||
@ -97,25 +97,25 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
}
|
||||
|
||||
$this->_profile = $profile;
|
||||
|
||||
|
||||
$xmlDataIterator = new SimpleXMLIterator($data);
|
||||
|
||||
if ($xmlDataIterator->getName() != 'projectProfile') {
|
||||
throw new Exception('Profiles must start with a projectProfile node');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->_unserializeRecurser($xmlDataIterator);
|
||||
|
||||
|
||||
$this->_lazyLoadContexts();
|
||||
|
||||
|
||||
return $this->_profile;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* _serializeRecurser()
|
||||
*
|
||||
*
|
||||
* This method will be used to traverse the depths of the structure
|
||||
* when *serializing* an xml structure into a string
|
||||
*
|
||||
@ -128,16 +128,16 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
//if ($resources instanceof Zend_Tool_Project_Profile_Resource) {
|
||||
// $resources = clone $resources;
|
||||
//}
|
||||
|
||||
|
||||
foreach ($resources as $resource) {
|
||||
|
||||
|
||||
if ($resource->isDeleted()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$resourceName = $resource->getContext()->getName();
|
||||
$resourceName[0] = strtolower($resourceName[0]);
|
||||
|
||||
|
||||
$newNode = $xmlNode->addChild($resourceName);
|
||||
|
||||
//$reflectionClass = new ReflectionClass($resource->getContext());
|
||||
@ -145,7 +145,7 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
if ($resource->isEnabled() == false) {
|
||||
$newNode->addAttribute('enabled', 'false');
|
||||
}
|
||||
|
||||
|
||||
foreach ($resource->getPersistentAttributes() as $paramName => $paramValue) {
|
||||
$newNode->addAttribute($paramName, $paramValue);
|
||||
}
|
||||
@ -153,15 +153,15 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
if ($resource->hasChildren()) {
|
||||
self::_serializeRecurser($resource, $newNode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* _unserializeRecurser()
|
||||
*
|
||||
*
|
||||
* This method will be used to traverse the depths of the structure
|
||||
* as needed to *unserialize* the profile from an xmlIterator
|
||||
*
|
||||
@ -170,9 +170,9 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
*/
|
||||
protected function _unserializeRecurser(SimpleXMLIterator $xmlIterator, Zend_Tool_Project_Profile_Resource $resource = null)
|
||||
{
|
||||
|
||||
|
||||
foreach ($xmlIterator as $resourceName => $resourceData) {
|
||||
|
||||
|
||||
$contextName = $resourceName;
|
||||
$subResource = new Zend_Tool_Project_Profile_Resource($contextName);
|
||||
$subResource->setProfile($this->_profile);
|
||||
@ -184,7 +184,7 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
}
|
||||
$subResource->setAttributes($attributes);
|
||||
}
|
||||
|
||||
|
||||
if ($resource) {
|
||||
$resource->append($subResource, false);
|
||||
} else {
|
||||
@ -194,23 +194,23 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
if ($this->_contextRepository->isOverwritableContext($contextName) == false) {
|
||||
$subResource->initializeContext();
|
||||
}
|
||||
|
||||
|
||||
if ($xmlIterator->hasChildren()) {
|
||||
self::_unserializeRecurser($xmlIterator->getChildren(), $subResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _lazyLoadContexts()
|
||||
*
|
||||
* This method will call initializeContext on the resources in a profile
|
||||
* @todo determine if this method belongs inside the profile
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected function _lazyLoadContexts()
|
||||
{
|
||||
|
||||
|
||||
foreach ($this->_profile as $topResource) {
|
||||
$rii = new RecursiveIteratorIterator($topResource, RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($rii as $resource) {
|
||||
@ -219,5 +219,5 @@ class Zend_Tool_Project_Profile_FileParser_Xml implements Zend_Tool_Project_Prof
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,12 +17,12 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ContextFilter.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: ContextFilter.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class is an iterator that will iterate only over enabled resources
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -30,32 +30,32 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIterator
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array
|
||||
*/
|
||||
protected $_acceptTypes = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array
|
||||
*/
|
||||
protected $_denyTypes = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array
|
||||
*/
|
||||
protected $_acceptNames = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array
|
||||
*/
|
||||
protected $_denyNames = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array
|
||||
*/
|
||||
protected $_rawOptions = array();
|
||||
|
||||
|
||||
/**
|
||||
* __construct()
|
||||
*
|
||||
@ -70,7 +70,7 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
$this->setOptions($options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setOptions()
|
||||
*
|
||||
@ -87,7 +87,7 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setAcceptTypes()
|
||||
*
|
||||
@ -99,11 +99,11 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
if (!is_array($acceptTypes)) {
|
||||
$acceptTypes = array($acceptTypes);
|
||||
}
|
||||
|
||||
|
||||
$this->_acceptTypes = $acceptTypes;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setDenyTypes()
|
||||
*
|
||||
@ -115,11 +115,11 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
if (!is_array($denyTypes)) {
|
||||
$denyTypes = array($denyTypes);
|
||||
}
|
||||
|
||||
|
||||
$this->_denyTypes = $denyTypes;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setAcceptNames()
|
||||
*
|
||||
@ -131,11 +131,11 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
if (!is_array($acceptNames)) {
|
||||
$acceptNames = array($acceptNames);
|
||||
}
|
||||
|
||||
|
||||
$this->_acceptNames = $acceptNames;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setDenyNames()
|
||||
*
|
||||
@ -147,11 +147,11 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
if (!is_array($denyNames)) {
|
||||
$denyNames = array($denyNames);
|
||||
}
|
||||
|
||||
|
||||
$this->_denyNames = $denyNames;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* accept() is required by teh RecursiveFilterIterator
|
||||
*
|
||||
@ -160,33 +160,33 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
public function accept()
|
||||
{
|
||||
$currentItem = $this->current();
|
||||
|
||||
|
||||
if (in_array($currentItem->getName(), $this->_acceptNames)) {
|
||||
return true;
|
||||
} elseif (in_array($currentItem->getName(), $this->_denyNames)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
foreach ($this->_acceptTypes as $acceptType) {
|
||||
if ($currentItem->getContent() instanceof $acceptType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ($this->_denyTypes as $denyType) {
|
||||
if ($currentItem->getContext() instanceof $denyType) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getChildren()
|
||||
*
|
||||
*
|
||||
* This is here due to a bug/design issue in PHP
|
||||
* @link
|
||||
* @link
|
||||
*
|
||||
* @return unknown
|
||||
*/
|
||||
@ -199,5 +199,5 @@ class Zend_Tool_Project_Profile_Iterator_ContextFilter extends RecursiveFilterIt
|
||||
|
||||
return $this->ref->newInstance($this->getInnerIterator()->getChildren(), $this->_rawOptions);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,12 +17,12 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: EnabledResourceFilter.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: EnabledResourceFilter.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class is an iterator that will iterate only over enabled resources
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Iterator_EnabledResourceFilter extends RecursiveFilterIterator
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* accept() is required by teh RecursiveFilterIterator
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Resource.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Resource.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ require_once 'Zend/Tool/Project/Context/Repository.php';
|
||||
|
||||
/**
|
||||
* This class is an iterator that will iterate only over enabled resources
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -40,12 +40,12 @@ require_once 'Zend/Tool/Project/Context/Repository.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resource_Container
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile
|
||||
*/
|
||||
protected $_profile = null;
|
||||
|
||||
|
||||
/**
|
||||
* @var Zend_Tool_Project_Profile_Resource
|
||||
*/
|
||||
@ -107,7 +107,7 @@ class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resou
|
||||
|
||||
/**
|
||||
* getName() - Get the resource name
|
||||
*
|
||||
*
|
||||
* Name is derived from the context name
|
||||
*
|
||||
* @return string
|
||||
@ -164,7 +164,7 @@ class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resou
|
||||
*
|
||||
* @param bool $enabled
|
||||
* @return Zend_Tool_Project_Profile_Resource
|
||||
*/
|
||||
*/
|
||||
public function setEnabled($enabled = true)
|
||||
{
|
||||
// convert fuzzy types to bool
|
||||
@ -203,7 +203,7 @@ class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resou
|
||||
{
|
||||
return $this->_deleted;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* initializeContext()
|
||||
*
|
||||
@ -217,15 +217,15 @@ class Zend_Tool_Project_Profile_Resource extends Zend_Tool_Project_Profile_Resou
|
||||
if (is_string($this->_context)) {
|
||||
$this->_context = Zend_Tool_Project_Context_Repository::getInstance()->getContext($this->_context);
|
||||
}
|
||||
|
||||
|
||||
if (method_exists($this->_context, 'setResource')) {
|
||||
$this->_context->setResource($this);
|
||||
}
|
||||
|
||||
|
||||
if (method_exists($this->_context, 'init')) {
|
||||
$this->_context->init();
|
||||
}
|
||||
|
||||
|
||||
$this->_isContextInitialized = true;
|
||||
return $this;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Container.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Container.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -27,7 +27,7 @@ require_once 'Zend/Tool/Project/Profile/Resource/SearchConstraints.php';
|
||||
|
||||
/**
|
||||
* This class is an iterator that will iterate only over enabled resources
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -35,12 +35,12 @@ require_once 'Zend/Tool/Project/Profile/Resource/SearchConstraints.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator, Countable
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_subResources = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
@ -54,9 +54,9 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
/**
|
||||
* Finder method to be able to find resources by context name
|
||||
* and attributes. Example usage:
|
||||
*
|
||||
*
|
||||
* <code>
|
||||
*
|
||||
*
|
||||
* </code>
|
||||
*
|
||||
* @param Zend_Tool_Project_Profile_Resource_SearchConstraints|string|array $searchParameters
|
||||
@ -67,42 +67,42 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
if (!$matchSearchConstraints instanceof Zend_Tool_Project_Profile_Resource_SearchConstraints) {
|
||||
$matchSearchConstraints = new Zend_Tool_Project_Profile_Resource_SearchConstraints($matchSearchConstraints);
|
||||
}
|
||||
|
||||
|
||||
$this->rewind();
|
||||
|
||||
|
||||
/**
|
||||
* @todo This should be re-written with better support for a filter iterator, its the way to go
|
||||
*/
|
||||
|
||||
|
||||
if ($nonMatchSearchConstraints) {
|
||||
$filterIterator = new Zend_Tool_Project_Profile_Iterator_ContextFilter($this, array('denyNames' => $nonMatchSearchConstraints));
|
||||
$riIterator = new RecursiveIteratorIterator($filterIterator, RecursiveIteratorIterator::SELF_FIRST);
|
||||
} else {
|
||||
$riIterator = new RecursiveIteratorIterator($this, RecursiveIteratorIterator::SELF_FIRST);
|
||||
}
|
||||
|
||||
|
||||
$foundResource = false;
|
||||
$currentConstraint = $matchSearchConstraints->getConstraint();
|
||||
$foundDepth = 0;
|
||||
|
||||
|
||||
foreach ($riIterator as $currentResource) {
|
||||
|
||||
|
||||
// if current depth is less than found depth, end
|
||||
if ($riIterator->getDepth() < $foundDepth) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (strtolower($currentResource->getName()) == strtolower($currentConstraint->name)) {
|
||||
|
||||
$paramsMatch = true;
|
||||
|
||||
|
||||
// @todo check to ensure params match (perhaps)
|
||||
if (count($currentConstraint->params) > 0) {
|
||||
$currentResourceAttributes = $currentResource->getAttributes();
|
||||
if (!is_array($currentConstraint->params)) {
|
||||
require_once 'Zend/Tool/Project/Profile/Exception.php';
|
||||
throw new Zend_Tool_Project_Profile_Exception('Search parameter specifics must be in the form of an array for key "'
|
||||
. $currentConstraint->name .'"');
|
||||
throw new Zend_Tool_Project_Profile_Exception('Search parameter specifics must be in the form of an array for key "'
|
||||
. $currentConstraint->name .'"');
|
||||
}
|
||||
foreach ($currentConstraint->params as $paramName => $paramValue) {
|
||||
if (!isset($currentResourceAttributes[$paramName]) || $currentResourceAttributes[$paramName] != $paramValue) {
|
||||
@ -111,10 +111,10 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($paramsMatch) {
|
||||
$foundDepth = $riIterator->getDepth();
|
||||
|
||||
|
||||
if (($currentConstraint = $matchSearchConstraints->getConstraint()) == null) {
|
||||
$foundResource = $currentResource;
|
||||
break;
|
||||
@ -122,12 +122,12 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $foundResource;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createResourceAt()
|
||||
*
|
||||
@ -146,13 +146,13 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
} else {
|
||||
$parentResource = $appendResourceOrSearchConstraints;
|
||||
}
|
||||
|
||||
|
||||
return $parentResource->createResource($context, $attributes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createResource()
|
||||
*
|
||||
*
|
||||
* Method to create a resource with a given context with specific attributes
|
||||
*
|
||||
* @param string $context
|
||||
@ -167,25 +167,25 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
$context = $contextRegistry->getContext($context);
|
||||
} else {
|
||||
require_once 'Zend/Tool/Project/Profile/Exception.php';
|
||||
throw new Zend_Tool_Project_Profile_Exception('Context by name ' . $context . ' was not found in the context registry.');
|
||||
throw new Zend_Tool_Project_Profile_Exception('Context by name ' . $context . ' was not found in the context registry.');
|
||||
}
|
||||
} elseif (!$context instanceof Zend_Tool_Project_Context_Interface) {
|
||||
require_once 'Zend/Tool/Project/Profile/Exception.php';
|
||||
throw new Zend_Tool_Project_Profile_Exception('Context must be of type string or Zend_Tool_Project_Context_Interface.');
|
||||
throw new Zend_Tool_Project_Profile_Exception('Context must be of type string or Zend_Tool_Project_Context_Interface.');
|
||||
}
|
||||
|
||||
|
||||
$newResource = new Zend_Tool_Project_Profile_Resource($context);
|
||||
|
||||
|
||||
if ($attributes) {
|
||||
$newResource->setAttributes($attributes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Interesting logic here:
|
||||
*
|
||||
*
|
||||
* First set the parentResource (this will also be done inside append). This will allow
|
||||
* the initialization routine to change the appendability of the parent resource. This
|
||||
* is important to allow specific resources to be appendable by very specific sub-resources.
|
||||
* is important to allow specific resources to be appendable by very specific sub-resources.
|
||||
*/
|
||||
$newResource->setParentResource($this);
|
||||
$newResource->initializeContext();
|
||||
@ -193,10 +193,10 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
|
||||
return $newResource;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setAttributes()
|
||||
*
|
||||
*
|
||||
* persist the attributes if the resource will accept them
|
||||
*
|
||||
* @param array $attributes
|
||||
@ -224,7 +224,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return $this->_attributes;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setAttribute()
|
||||
*
|
||||
@ -237,7 +237,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
$this->_attributes[$name] = $value;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getAttribute()
|
||||
*
|
||||
@ -260,7 +260,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
$this->_appendable = (bool) $appendable;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* isAppendable()
|
||||
*
|
||||
@ -270,7 +270,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return $this->_appendable;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setParentResource()
|
||||
*
|
||||
@ -282,7 +282,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
$this->_parentResource = $parentResource;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getParentResource()
|
||||
*
|
||||
@ -292,7 +292,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return $this->_parentResource;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* append()
|
||||
*
|
||||
@ -306,10 +306,10 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
}
|
||||
array_push($this->_subResources, $resource);
|
||||
$resource->setParentResource($this);
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* current() - required by RecursiveIterator
|
||||
*
|
||||
@ -319,7 +319,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return current($this->_subResources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* key() - required by RecursiveIterator
|
||||
*
|
||||
@ -329,7 +329,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return key($this->_subResources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* next() - required by RecursiveIterator
|
||||
*
|
||||
@ -339,7 +339,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return next($this->_subResources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* rewind() - required by RecursiveIterator
|
||||
*
|
||||
@ -349,7 +349,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return reset($this->_subResources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* valid() - - required by RecursiveIterator
|
||||
*
|
||||
@ -359,7 +359,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return (bool) $this->current();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hasChildren()
|
||||
*
|
||||
@ -369,7 +369,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return (count($this->_subResources > 0)) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getChildren()
|
||||
*
|
||||
@ -379,7 +379,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return $this->current();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* count()
|
||||
*
|
||||
@ -389,7 +389,7 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
{
|
||||
return count($this->_subResources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* __clone()
|
||||
*
|
||||
@ -401,5 +401,5 @@ class Zend_Tool_Project_Profile_Resource_Container implements RecursiveIterator,
|
||||
$this->_subResources[$index] = clone $resource;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,12 +17,12 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: SearchConstraints.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: SearchConstraints.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
* This class is an iterator that will iterate only over enabled resources
|
||||
*
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_Tool
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
@ -30,12 +30,12 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Profile_Resource_SearchConstraints
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $_constraints = array();
|
||||
|
||||
|
||||
/**
|
||||
* __construct()
|
||||
*
|
||||
@ -49,7 +49,7 @@ class Zend_Tool_Project_Profile_Resource_SearchConstraints
|
||||
$this->setOptions($options);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* setOptions()
|
||||
*
|
||||
@ -68,7 +68,7 @@ class Zend_Tool_Project_Profile_Resource_SearchConstraints
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* addConstraint()
|
||||
*
|
||||
@ -84,13 +84,13 @@ class Zend_Tool_Project_Profile_Resource_SearchConstraints
|
||||
$name = $constraint['name'];
|
||||
$params = $constraint['params'];
|
||||
}
|
||||
|
||||
|
||||
$constraint = $this->_makeConstraint($name, $params);
|
||||
|
||||
|
||||
array_push($this->_constraints, $constraint);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getConstraint()
|
||||
*
|
||||
@ -113,5 +113,5 @@ class Zend_Tool_Project_Profile_Resource_SearchConstraints
|
||||
$value = array('name' => $name, 'params' => $params);
|
||||
return new ArrayObject($value, ArrayObject::ARRAY_AS_PROPS);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Abstract.php 17795 2009-08-24 19:04:01Z ralph $
|
||||
* @version $Id: Abstract.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -120,32 +120,32 @@ abstract class Zend_Tool_Project_Provider_Abstract extends Zend_Tool_Framework_P
|
||||
}
|
||||
|
||||
$profile = new Zend_Tool_Project_Profile();
|
||||
|
||||
|
||||
$parentDirectoriesArray = explode(DIRECTORY_SEPARATOR, ltrim($projectDirectory, DIRECTORY_SEPARATOR));
|
||||
while ($parentDirectoriesArray) {
|
||||
$projectDirectoryAssembled = implode(DIRECTORY_SEPARATOR, $parentDirectoriesArray);
|
||||
|
||||
|
||||
if (DIRECTORY_SEPARATOR !== "\\") {
|
||||
$projectDirectoryAssembled = DIRECTORY_SEPARATOR . $projectDirectoryAssembled;
|
||||
}
|
||||
|
||||
|
||||
$profile->setAttribute('projectDirectory', $projectDirectoryAssembled);
|
||||
if ($profile->isLoadableFromFile()) {
|
||||
chdir($projectDirectoryAssembled);
|
||||
|
||||
|
||||
$profile->loadFromFile();
|
||||
$this->_loadedProfile = $profile;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// break after first run if we are not to check upper directories
|
||||
if ($searchParentDirectories == false) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
array_pop($parentDirectoriesArray);
|
||||
}
|
||||
|
||||
|
||||
if ($this->_loadedProfile == null) {
|
||||
if ($loadProfileFlag == self::NO_PROFILE_THROW_EXCEPTION) {
|
||||
throw new Zend_Tool_Project_Provider_Exception('A project profile was not found.');
|
||||
@ -207,11 +207,11 @@ abstract class Zend_Tool_Project_Provider_Abstract extends Zend_Tool_Framework_P
|
||||
|
||||
protected function _getContentForContext(Zend_Tool_Project_Context_Interface $context, $methodName, $parameters)
|
||||
{
|
||||
$storage = $this->_registry->getStorage();
|
||||
$storage = $this->_registry->getStorage();
|
||||
if (!$storage->isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!class_exists('Zend_Tool_Project_Context_Content_Engine')) {
|
||||
require_once 'Zend/Tool/Project/Context/Content/Engine.php';
|
||||
}
|
||||
@ -219,7 +219,7 @@ abstract class Zend_Tool_Project_Provider_Abstract extends Zend_Tool_Framework_P
|
||||
$engine = new Zend_Tool_Project_Context_Content_Engine($storage);
|
||||
return $engine->getContent($context, $methodName, $parameters);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* _loadContextClassesIntoRegistry() - This is called by the constructor
|
||||
* so that child providers can provide a list of contexts to load into the
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Exception.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,5 +33,5 @@ require_once 'Zend/Tool/Project/Exception.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Exception extends Zend_Tool_Project_Exception
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Form.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Form.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,11 +28,11 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Form extends Zend_Tool_Project_Provider_Abstract
|
||||
{
|
||||
|
||||
|
||||
public function create($name)
|
||||
{
|
||||
echo '@todo - create form';
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Manifest.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Manifest.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -66,10 +66,10 @@ require_once 'Zend/Tool/Project/Provider/ProjectProvider.php';
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Manifest implements
|
||||
class Zend_Tool_Project_Provider_Manifest implements
|
||||
Zend_Tool_Framework_Manifest_ProviderManifestable
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* getProviders()
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Model.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Model.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Model extends Zend_Tool_Project_Provider_Abstract
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -38,6 +38,6 @@ class Zend_Tool_Project_Provider_Model extends Zend_Tool_Project_Provider_Abstra
|
||||
{
|
||||
echo '@todo - create model';
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Module.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Module.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -46,7 +46,7 @@ require_once 'Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php';
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Module
|
||||
class Zend_Tool_Project_Provider_Module
|
||||
extends Zend_Tool_Project_Provider_Abstract
|
||||
implements Zend_Tool_Framework_Provider_Pretendable
|
||||
{
|
||||
@ -58,45 +58,45 @@ class Zend_Tool_Project_Provider_Module
|
||||
if ($targetModuleResource == null) {
|
||||
$targetModuleResource = $profile->search('applicationDirectory');
|
||||
$targetModuleEnabledResources = array(
|
||||
'ControllersDirectory', 'ModelsDirectory', 'ViewsDirectory',
|
||||
'ControllersDirectory', 'ModelsDirectory', 'ViewsDirectory',
|
||||
'ViewScriptsDirectory', 'ViewHelpersDirectory', 'ViewFiltersDirectory'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// find the actual modules directory we will use to house our module
|
||||
$modulesDirectory = $profile->search('modulesDirectory');
|
||||
|
||||
|
||||
// if there is a module directory already, except
|
||||
if ($modulesDirectory->search(array('moduleDirectory' => array('moduleName' => $moduleName)))) {
|
||||
throw new Zend_Tool_Project_Provider_Exception('A module named "' . $moduleName . '" already exists.');
|
||||
}
|
||||
|
||||
|
||||
// create the module directory
|
||||
$moduleDirectory = $modulesDirectory->createResource('moduleDirectory', array('moduleName' => $moduleName));
|
||||
|
||||
|
||||
// create a context filter so that we can pull out only what we need from the module skeleton
|
||||
$moduleContextFilterIterator = new Zend_Tool_Project_Profile_Iterator_ContextFilter(
|
||||
$targetModuleResource,
|
||||
$targetModuleResource,
|
||||
array(
|
||||
'denyNames' => array('ModulesDirectory', 'ViewControllerScriptsDirectory'),
|
||||
'denyType' => 'Zend_Tool_Project_Context_Filesystem_File'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
// the iterator for the module skeleton
|
||||
$targetIterator = new RecursiveIteratorIterator($moduleContextFilterIterator, RecursiveIteratorIterator::SELF_FIRST);
|
||||
|
||||
|
||||
// initialize some loop state information
|
||||
$currentDepth = 0;
|
||||
$parentResources = array();
|
||||
$currentResource = $moduleDirectory;
|
||||
|
||||
|
||||
// loop through the target module skeleton
|
||||
foreach ($targetIterator as $targetSubResource) {
|
||||
|
||||
|
||||
$depthDifference = $targetIterator->getDepth() - $currentDepth;
|
||||
$currentDepth = $targetIterator->getDepth();
|
||||
|
||||
|
||||
if ($depthDifference === 1) {
|
||||
// if we went down into a child, make note
|
||||
array_push($parentResources, $currentResource);
|
||||
@ -114,7 +114,7 @@ class Zend_Tool_Project_Provider_Module
|
||||
// get parameters for the newly created module resource
|
||||
$params = $targetSubResource->getAttributes();
|
||||
$currentChildResource = $currentResource->createResource($targetSubResource->getName(), $params);
|
||||
|
||||
|
||||
// based of the provided list (Currently up top), enable specific resources
|
||||
if (isset($targetModuleEnabledResources)) {
|
||||
$currentChildResource->setEnabled(in_array($targetSubResource->getName(), $targetModuleEnabledResources));
|
||||
@ -123,10 +123,10 @@ class Zend_Tool_Project_Provider_Module
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $moduleDirectory;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -135,11 +135,11 @@ class Zend_Tool_Project_Provider_Module
|
||||
public function create($name) //, $moduleProfile = null)
|
||||
{
|
||||
$this->_loadProfile(self::NO_PROFILE_THROW_EXCEPTION);
|
||||
|
||||
|
||||
$resources = self::createResources($this->_loadedProfile, $name);
|
||||
|
||||
|
||||
$response = $this->_registry->getResponse();
|
||||
|
||||
|
||||
if ($this->_registry->getRequest()->isPretend()) {
|
||||
$response->appendContent('I would create the following module and artifacts:');
|
||||
foreach (new RecursiveIteratorIterator($resources, RecursiveIteratorIterator::SELF_FIRST) as $resource) {
|
||||
@ -154,12 +154,12 @@ class Zend_Tool_Project_Provider_Module
|
||||
$response->appendContent($resource->getContext()->getPath());
|
||||
$resource->create();
|
||||
}
|
||||
|
||||
|
||||
// store changes to the profile
|
||||
$this->_storeProfile();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Profile.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Profile.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -33,7 +33,7 @@ require_once 'Zend/Tool/Project/Provider/Abstract.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Profile extends Zend_Tool_Project_Provider_Abstract
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* show()
|
||||
*
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Project.php 16972 2009-07-22 18:44:24Z ralph $
|
||||
* @version $Id: Project.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -35,7 +35,7 @@ class Zend_Tool_Project_Provider_Project extends Zend_Tool_Project_Provider_Abst
|
||||
{
|
||||
|
||||
protected $_specialties = array('Info');
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -65,39 +65,39 @@ class Zend_Tool_Project_Provider_Project extends Zend_Tool_Project_Provider_Abst
|
||||
}
|
||||
|
||||
$profileData = null;
|
||||
|
||||
|
||||
if ($fileOfProfile != null && file_exists($fileOfProfile)) {
|
||||
$profileData = file_get_contents($fileOfProfile);
|
||||
}
|
||||
|
||||
|
||||
$storage = $this->_registry->getStorage();
|
||||
if ($profileData == '' && $nameOfProfile != null && $storage->isEnabled()) {
|
||||
$profileData = $storage->get('project/profiles/' . $nameOfProfile . '.xml');
|
||||
}
|
||||
|
||||
|
||||
if ($profileData == '') {
|
||||
$profileData = $this->_getDefaultProfile();
|
||||
}
|
||||
|
||||
|
||||
$newProfile = new Zend_Tool_Project_Profile(array(
|
||||
'projectDirectory' => $path,
|
||||
'profileData' => $profileData
|
||||
));
|
||||
|
||||
$newProfile->loadFromData();
|
||||
|
||||
|
||||
$this->_registry->getResponse()->appendContent('Creating project at ' . $path);
|
||||
|
||||
foreach ($newProfile->getIterator() as $resource) {
|
||||
$resource->create();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function show()
|
||||
{
|
||||
$this->_registry->getResponse()->appendContent('You probably meant to run "show project.info".', array('color' => 'yellow'));
|
||||
}
|
||||
|
||||
|
||||
public function showInfo()
|
||||
{
|
||||
$profile = $this->_loadProfile(self::NO_PROFILE_RETURN_FALSE);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* @subpackage Framework
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Test.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Test.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -38,9 +38,9 @@ require_once 'Zend/Tool/Project/Provider/Exception.php';
|
||||
*/
|
||||
class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstract
|
||||
{
|
||||
|
||||
|
||||
protected $_specialties = array('Application', 'Library');
|
||||
|
||||
|
||||
/**
|
||||
* isTestingEnabled()
|
||||
*
|
||||
@ -51,10 +51,10 @@ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstrac
|
||||
{
|
||||
$profileSearchParams = array('testsDirectory');
|
||||
$testsDirectory = $profile->search($profileSearchParams);
|
||||
|
||||
|
||||
return $testsDirectory->isEnabled();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createApplicationResource()
|
||||
*
|
||||
@ -69,28 +69,28 @@ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstrac
|
||||
if (!is_string($controllerName)) {
|
||||
throw new Zend_Tool_Project_Provider_Exception('Zend_Tool_Project_Provider_View::createApplicationResource() expects \"controllerName\" is the name of a controller resource to create.');
|
||||
}
|
||||
|
||||
|
||||
if (!is_string($actionName)) {
|
||||
throw new Zend_Tool_Project_Provider_Exception('Zend_Tool_Project_Provider_View::createApplicationResource() expects \"actionName\" is the name of a controller resource to create.');
|
||||
}
|
||||
|
||||
|
||||
$testsDirectoryResource = $profile->search('testsDirectory');
|
||||
|
||||
|
||||
if (($testAppDirectoryResource = $testsDirectoryResource->search('testApplicationDirectory')) === false) {
|
||||
$testAppDirectoryResource = $testsDirectoryResource->createResource('testApplicationDirectory');
|
||||
}
|
||||
|
||||
|
||||
if ($moduleName) {
|
||||
//@todo $moduleName
|
||||
$moduleName = '';
|
||||
}
|
||||
|
||||
|
||||
if (($testAppControllerDirectoryResource = $testAppDirectoryResource->search('testApplicationControllerDirectory')) === false) {
|
||||
$testAppControllerDirectoryResource = $testAppDirectoryResource->createResource('testApplicationControllerDirectory');
|
||||
}
|
||||
|
||||
|
||||
$testAppControllerFileResource = $testAppControllerDirectoryResource->createResource('testApplicationControllerFile', array('forControllerName' => $controllerName));
|
||||
|
||||
|
||||
return $testAppControllerFileResource;
|
||||
}
|
||||
|
||||
@ -104,46 +104,46 @@ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstrac
|
||||
public static function createLibraryResource(Zend_Tool_Project_Profile $profile, $libraryClassName)
|
||||
{
|
||||
$testLibraryDirectoryResource = $profile->search(array('TestsDirectory', 'TestLibraryDirectory'));
|
||||
|
||||
|
||||
|
||||
|
||||
$fsParts = explode('_', $libraryClassName);
|
||||
|
||||
|
||||
$currentDirectoryResource = $testLibraryDirectoryResource;
|
||||
|
||||
|
||||
while ($nameOrNamespacePart = array_shift($fsParts)) {
|
||||
|
||||
if (count($fsParts) > 0) {
|
||||
|
||||
|
||||
if (($libraryDirectoryResource = $currentDirectoryResource->search(array('TestLibraryNamespaceDirectory' => array('namespaceName' => $nameOrNamespacePart)))) === false) {
|
||||
$currentDirectoryResource = $currentDirectoryResource->createResource('TestLibraryNamespaceDirectory', array('namespaceName' => $nameOrNamespacePart));
|
||||
} else {
|
||||
$currentDirectoryResource = $libraryDirectoryResource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
if (($libraryFileResource = $currentDirectoryResource->search(array('TestLibraryFile' => array('forClassName' => $libraryClassName)))) === false) {
|
||||
$libraryFileResource = $currentDirectoryResource->createResource('TestLibraryFile', array('forClassName' => $libraryClassName));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $libraryFileResource;
|
||||
}
|
||||
|
||||
|
||||
public function enable()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function disable()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* create()
|
||||
*
|
||||
@ -152,15 +152,15 @@ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstrac
|
||||
public function create($libraryClassName)
|
||||
{
|
||||
$profile = $this->_loadProfile();
|
||||
|
||||
|
||||
if (!self::isTestingEnabled($profile)) {
|
||||
$this->_registry->getResponse()->appendContent('Testing is not enabled for this project.');
|
||||
}
|
||||
|
||||
|
||||
$testLibraryResource = self::createLibraryResource($profile, $libraryClassName);
|
||||
|
||||
|
||||
$response = $this->_registry->getResponse();
|
||||
|
||||
|
||||
if ($this->_registry->getRequest()->isPretend()) {
|
||||
$response->appendContent('Would create a library stub in location ' . $testLibraryResource->getContext()->getPath());
|
||||
} else {
|
||||
@ -168,7 +168,7 @@ class Zend_Tool_Project_Provider_Test extends Zend_Tool_Project_Provider_Abstrac
|
||||
$testLibraryResource->create();
|
||||
$this->_storeProfile();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user