zf1-release-1.12.20/000077500000000000000000000000001276427527200140115ustar00rootroot00000000000000zf1-release-1.12.20/.gitattributes000066400000000000000000000001321276427527200167000ustar00rootroot00000000000000/demos export-ignore /tests export-ignore /documentation export-ignore zf1-release-1.12.20/.gitignore000066400000000000000000000006641276427527200160070ustar00rootroot00000000000000.vagrant tests/Zend/Db/Table/_files/cachefiles/* tests/Zend/Auth/Adapter/OpenId/_files/* tests/Zend/Filter/_files/Compress/* tests/Zend/Filter/_files/Users/* tests/Zend/OpenId/Provider/Storage/_files/* tests/Zend/OpenId/_files/* tests/Zend/Translate/Adapter/_files/zend_cache---internal-metadatas---testid tests/Zend/Translate/Adapter/_files/zend_cache---testid tests/TestConfiguration.php vendor/* composer.lock bin/dbunit bin/phpunit zf1-release-1.12.20/.travis.yml000066400000000000000000000021721276427527200161240ustar00rootroot00000000000000language: php sudo: false php: - 5.2 - 5.3 - 5.4 - 5.5 - 5.6 - 7 - hhvm env: TMPDIR=/tmp install: - if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then sh ./tests/php52_install_dependencies.sh; fi - phpenv rehash services: - memcached before_script: - phpenv config-rm xdebug.ini || return 0 - if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]]; then travis_retry composer self-update; fi - if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]]; then travis_retry composer install --no-interaction --prefer-source --dev; fi - mysql -e 'create database zftest;' - psql -c 'create database zftest;' -U postgres - if [[ "$TRAVIS_PHP_VERSION" != "5.2" ]] && [[ "$TRAVIS_PHP_VERSION" != "hhvm" ]] && [[ "$TRAVIS_PHP_VERSION" != "7" ]]; then phpenv config-add tests/config.ini; fi - if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then phpenv config-add tests/php52_config.ini; fi - if [[ "$TRAVIS_PHP_VERSION" == "7" ]]; then phpenv config-add tests/php7_config.ini; fi - cp ./tests/TestConfiguration.travis.php ./tests/TestConfiguration.php script: - cd tests/ - php runalltests.php matrix: allow_failures: - php: 7 - php: hhvm zf1-release-1.12.20/CONTRIBUTING.md000066400000000000000000000040511276427527200162420ustar00rootroot00000000000000# CONTRIBUTING > ## End-of-Life occurs 28 Sep 2016 > > Between now and 28 Sep 2016, we will only be accepting security patches to > this repository; after that date, we will issue no more releases. > > For more information: > > - https://framework.zend.com/blog/2016-06-28-zf1-eol.html --- > ## Contributors License Agreement > > **To submit code, patches, and proposals to Zend Framework, contributors must agree to the New BSD License and also submit a signed [Contributor License Agreement (CLA)](https://github.com/zendframework/zf1/wiki/Contributor-License-Agreement-%28CLA%29).** ## RESOURCES If you wish to contribute to Zend Framework, please be sure to read/subscribe to the following resources: - Coding Standards: http://framework.zend.com/manual/1.12/en/coding-standard.html - ZF Git Guide: [README-GIT.md](README-GIT.md) - Contributor's Guide: http://framework.zend.com/participate/contributor-guide-v1 - ZF Contributor's mailing list: Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html Subscribe: zf-contributors-subscribe@lists.zend.com - ZF Contributor's IRC channel: #zftalk.dev on Freenode.net ## Reporting Potential Security Issues If you have encountered a potential security vulnerability in Zend Framework, please report it to us at [zf-security@zend.com](mailto:zf-security@zend.com). We will work with you to verify the vulnerability and patch it. When reporting issues, please provide the following information: - Component(s) affected - A description indicating how to reproduce the issue - A summary of the security vulnerability and impact We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure; this helps protect Zend Framework users and provides them with a chance to upgrade and/or update in order to protect their applications. For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). zf1-release-1.12.20/DEVELOPMENT_README.md000066400000000000000000000034361276427527200171400ustar00rootroot00000000000000# Development using a virtual machine You can set up a development virtual machine for ZF1 unit testing and library development following these simple instructions. ### 1. Install requirements for VM. (Note: these are not required by ZF1 itself) - VirtualBox (https://www.virtualbox.org/) - Ruby (http://www.ruby-lang.org/) - Vagrant (http://vagrantup.com/) ### 2. Checkout repository to any location git clone git://github.com/zendframework/zf1.git zf1-dev cd zf1-dev ### 3. Start the process by running Vagrant. vagrant up This will take a long while as it has to download a VM image and then provision it. Once it has finished, it will exit and leave you back at the command prompt. ### 4. SSH into the VM vagrant ssh ### 5. Build a version of PHP. php-build.sh 5.3.11 This also takes a while as it compiles PHP for you! ### 6. Select PHP to use: pe 5.3.11 ### 7. Run tests cd /vagrant/tests phpunit --stderr -d memory_limit=-1 Zend/Acl/AclTest.php phpunit --stderr -d memory_limit=-1 Zend/Amf/AllTests.php (etc...) Note that you can repeat items 5 and 6 to create any version if PHP. ## Notes: - The VM will be running in the background as VBoxHeadless - HTTP and SSH ports on the VM are forwarded to localhost (22 -> 2222, 80 -> 8081) - The zf1-dev directory you checked out will be mounted inside the VM at /vagrant - You can develop by editing the files you cloned in the IDE of you choice. To stop the VM do one of the following: vagrant suspend # if you plan on running it later vagrant halt # if you wish to turn off the VM, but keep it around vagrant destroy # if you wish to delete the VM completely Also, when any of of the Puppet manifests change (.pp files), it is a good idea to rerun them: vagrant provisionzf1-release-1.12.20/INSTALL.md000066400000000000000000000070311276427527200154420ustar00rootroot00000000000000INSTALLATION ------------ Zend Framework requires no special installation steps. Simply download the framework, extract it to the folder you would like to keep it in, and add the library directory to your PHP `include_path`. To use components in the extras library, add the extras/library directory to your PHP `include_path`, as well. If you would like to use `Zend_Tool`, simply add `bin/zf.bat` (for Windows) or `bin/zf.sh` (for anything else) to your system executable path. SYSTEM REQUIREMENTS ------------------- Zend Framework requires PHP 5.2.11 or later. Please see the system requirements appendix for more detailed information: - http://framework.zend.com/manual/en/requirements.html DEVELOPMENT VERSIONS -------------------- If you would like to preview enhancements or bug fixes that have not yet been released, you can obtain the current development version of Zend Framework using one of the following methods: * Using a git client. Zend Framework is open source software, and the git repository used for its development is publicly available. Consider using git to get Zend Framework if you already use git for your application development, want to contribute back to the framework, or need to upgrade your framework version very often. Checking out a working copy is necessary if you would like to directly contribute to Zend Framework; a working copy can be updated any time with `git fetch && git rebase origin/master`. A git submodules definition is highly convenient for developers already using git to manage their application working copies. The URL for the the Zend Framework 1.X git repository is: - https://github.com/zendframework/zf1 For more information about git, please see the official website: - http://git-scm.com * Using Subversion. You may pin an svn:externals definition to our repository. For versions prior to 1.12.0, use the following URLs: - http://framework.zend.com/svn/framework/standard/branches/release-1.{minor version} - http://framework.zend.com/svn/framework/standard/tags/release-1.{minor version}.{maintenance version} - http://framework.zend.com/svn/framework/extras/branches/release-1.{minor version} For versions 1.12.0 and on, use the following URLs: - https://github.com/zendframework/zf1/trunk (development version) - https://github.com/zendframework/zf1/tags/release-1.12.{maintenance version} - https://github.com/zendframework/zf1-extras/trunk For more information on subversion, please visit the official website: - http://subversion.apache.org/ CONFIGURING THE INCLUDE PATH ---------------------------- Once you have a copy of Zend Framework available, your application will need to access the framework classes. Though there are several ways to achieve this, your PHP `include_path` needs to contain the path to the Zend Framework classes under the `/library` directory in this distribution. You can find out more about the PHP `include_path` configuration directive here: - http://www.php.net/manual/en/ini.core.php#ini.include-path Instructions on how to change PHP configuration directives can be found here: - http://www.php.net/manual/en/configuration.changes.php GETTING STARTED --------------- A great place to get up-to-speed quickly is the Zend Framework QuickStart: - http://framework.zend.com/docs/quickstart The QuickStart covers some of the most commonly used components of ZF. Since Zend Framework is designed with a use-at-will architecture and components are loosely coupled, you can select and use only those components that are needed for your project. zf1-release-1.12.20/LICENSE.txt000066400000000000000000000030141276427527200156320ustar00rootroot00000000000000Copyright (c) 2005-2015, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zf1-release-1.12.20/README-GIT.md000077500000000000000000000146771276427527200157330ustar00rootroot00000000000000# USING THE GIT REPOSITORY ## Setup your own public repository Your first step is to establish a public repository from which we can pull your work into the master repository. You have two options: use GitHub or other public site, or setup/use your own repository. While you can use a private repository and utilize ``git format-patch`` to submit patches, this is discouraged as it does not facilitate public peer review. ### Option 1: GitHub 1. Setup a GitHub account (http://github.com/), if you haven't yet 2. Fork the ZF1 repository (http://github.com/zendframework/zf1) 3. Clone your fork locally and enter it (use your own GitHub username in the statement below) ```sh % git clone git@github.com:/zf1.git % cd zf1 ``` 4. Add a remote to the canonical ZF repository, so you can keep your fork up-to-date: ```sh % git remote add zf1 https://github.com/zendframework/zf1.git % git fetch zf1 ``` ### Option 2: Personal Repository We assume you will use gitosis (http://git-scm.com/book/en/Git-on-the-Server-Gitosis) or gitolite (http://git-scm.com/book/en/Git-on-the-Server-Gitolite) to host your own repository. If you go this route, we will assume you have the knowledge to do so, or know where to obtain it. We will not assist you in setting up such a repository. 1. Create a new repository ```sh % git init ``` 2. Add an "origin" remote pointing to your gitosis/gitolite repo: ```sh % git remote add origin git://yourdomain/yourrepo.git ``` 3. Add a remote for the ZF repository and fetch it ```sh % git remote add zf1 https://github.com/zendframework/zf1.git % git fetch zf1 ``` 4. Create a new branch for the ZF repository (named "zf/master" here) ```sh % git checkout -b zf/master zf1/master ``` 5. Create your master branch off the ZF branch, and push to your repository ```sh % git checkout -b master % git push origin HEAD:master ``` ## Contributor License Agreement and your git configuration In order for us to accept your changes to Zend Framework 1.X, you must sign and return a Contributors License Agreement (http://framework.zend.com/cla or http://framework.zend.com/ccla). For us to verify that you have a CLA on file, we need you to do one of the following: * If your github username matches the username with which you registered on the former Zend Framework issue tracker (our old JIRA instance), we should be able to look you up fine. * Otherwise, please ensure that you set your user email in your working directory to match the email we have on file with your CLA. This can be done with the following ```sh % git config user.email "your-email@example.org" ``` We can then look up your CLA status based on your commits. If we cannot determine your CLA status, we will ask in a comment on the pull request for either your username or email. ## Keeping Up-to-Date Periodically, you should update your fork or personal repository to match the canonical ZF repository. In each of the above setups, we have added a remote to the Zend Framework repository, which allows you to do the following: ```sh % git checkout master % git pull zf1 master - OPTIONALLY, to keep your remote up-to-date - % git push origin ``` ## Working on Zend Framework When working on Zend Framework, we recommend you do each new feature or bugfix in a new branch. This simplifies the task of code review as well as of merging your changes into the canonical repository. A typical work flow will then consist of the following: 1. Create a new local branch based off your master branch. 2. Switch to your new local branch. (This step can be combined with the previous step with the use of `git checkout -b`.) 3. Do some work, commit, repeat as necessary. 4. Push the local branch to your remote repository. 5. Send a pull request. The mechanics of this process are actually quite trivial. Below, we will create a branch for fixing an issue in the tracker. ```sh % git checkout -b zf9295 Switched to a new branch 'zf9295' ``` ... do some work ... ```sh % git commit ``` ... write your log message ... ```sh % git push origin HEAD:zf9295 Counting objects: 38, done. Delta compression using up to 2 threads. Compression objects: 100% (18/18), done. Writing objects: 100% (20/20), 8.19KiB, done. Total 20 (delta 12), reused 0 (delta 0) To ssh://git@github.com/weierophinney/zf1.git b5583aa..4f51698 HEAD -> master ``` To send a pull request, you have two options. If using GitHub, you can do the pull request from there. Navigate to your repository, select the branch you just created, and then select the "Pull Request" button in the upper right. Select the user "zendframework" as the recipient. If using your own repository - or even if using GitHub - you can send an email indicating you have changes to pull: - Send to - In your message, specify: - The URL to your repository (e.g., `git://mwop.net/zf1.git`) - The branch containing the changes you want pulled (e.g., `zf9295`) - The nature of the changes (e.g., `implements Zend_Service_Twitter`, `fixes ZF-9295`, etc.) ### What branch to issue the pull request against? Which branch should you issue a pull request against? - For fixes against the stable release, issue the pull request against the "master" branch. - For new features, or fixes that introduce new elements to the public API (such as new public methods or properties), issue the pull request against the "develop" branch. ## Branch Cleanup As you might imagine, if you are a frequent contributor, you'll start to get a ton of branches both locally and on your remote. Once you know that your changes have been accepted to the master repository, we suggest doing some cleanup of these branches. - Local branch cleanup ```sh % git branch -d ``` - Remote branch removal ```sh % git push origin : ``` ## FEEDS AND EMAILS RSS feeds may be found at: - `https://github.com/zendframework/zf1/commits/.atom` where <branch> is a branch in the repository. To subscribe to git email notifications, simply watch or fork the zf1 repository on GitHub. ## CONTRIBUTORS AND COMMITTERS Both Zend's internal Zend Framework team and the members of the Community Review team have push privileges to the ZF1 repository. Additionally, a number of members of the community have been vetted to merge pull requests. When in doubt, hop into Freenode IRC, and ask in the #zftalk.dev channel for somebody to review and/or merge your change. zf1-release-1.12.20/README.md000066400000000000000000000147631276427527200153030ustar00rootroot00000000000000![Logo](http://framework.zend.com/images/logos/ZendFramework-logo.png) > ## End-of-Life occurs 28 Sep 2016 > > Between now and 28 Sep 2016, we will only be accepting security patches to > this repository; after that date, we will issue no more releases. > > For more information: > > - https://framework.zend.com/blog/2016-06-28-zf1-eol.html --- Welcome to the Zend Framework 1.12 Release! Master: [![Build Status](https://api.travis-ci.org/zendframework/zf1.png?branch=master)](https://travis-ci.org/zendframework/zf1) RELEASE INFORMATION =================== Zend Framework 1.12.20 Release. Released on September 08, 2016. IMPORTANT FIXES FOR 1.12.20 --------------------------- **This release contains security updates:** - **ZF2016-03:** The implementation of `ORDER BY` and `GROUP BY` in `Zend_Db_Select` remained prone to SQL injection when a combination of SQL expressions and comments were used. This release provides a comprehensive solution that identifies and removes comments prior to checking validity of the statement to ensure no SQLi vectors occur. We advise always filtering user input prior to invoking these methods, however, to further protect your applications. See http://framework.zend.com/changelog for full details. NEW FEATURES ============ Zend_Loader changes ------------------- A number of autoloaders and autoloader facilities were back ported from ZF2 to provide performant alternatives to those already available in the 1.X releases. These include: Zend_Loader_StandardAutoloader, which improves on Zend_Loader_Autoloader by allowing the ability to specify a specific path to associate with a vendor prefix or namespace; Zend_Loader_ClassMapAutoloader, which provides the ability to use lookup tables for autoloading (which are typically the fastest possible way to autoload); and Zend_Loader_AutoloaderFactory, which can both create and update autoloaders for you, as well as register them with spl_autoload_register(). The Zend_Loader changes were back ported from ZF2 by Matthew Weier O’Phinney Zend_EventManager ----------------- Zend_EventManager is a component that allows you to attach and detach listeners to named events, both on a per-instance basis as well as via shared collections; trigger events; and interrupt execution of listeners. Zend_EventManager was back ported from ZF2 by Matthew Weier O’Phinney Zend_Http_UserAgent_Features_Adapter_Browscap --------------------------------------------- This class provides a features adapter that calls get_browser() in order to discover mobile device capabilities to inject into UserAgent device instances. Browscap (http://browsers.garykeith.com/) is an open project dedicated to collecting an disseminating a “database” of browser capabilities. PHP has built-in support for using these files via the get_browser() function. This function requires that your php.ini provides a browscap entry pointing to the PHP-specific php_browscap.ini file which is available at http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI. Zend_Http_UserAgent_Features_Adapter_Browscap was created by Matthew Weier O’Phinney Zend_Mobile_Push ---------------- Zend_Mobile_Push is a component for implementing push notifications for the 3 major push notification platforms (Apple (Apns), Google (C2dm) and Microsoft (Mpns). Zend_Mobile_Push was contributed by Mike Willbanks. Zend_Gdata_Analytics -------------------- Zend_Gdata_Analytics is an extension to Zend_Gdata to allow interaction with Google’s Analytics Data Export API. This extension does not encompass any major changes in the overall operation of Zend_Gdata components. Zend_Gdata_Analytics was contributed by Daniel Hartmann. Removed features ================ Zend_Http_UserAgent_Features_Adapter_WurflApi --------------------------------------------- Due to the changes in licensing of WURFL, we have removed the WurflApi adapter. We will be providing the WurflApi adapter to ScientiaMobile so that users of WURFL will still have that option. Bug Fixes ========= In addition, over 200 reported issues in the tracker have been fixed. We’d like to particularly thank Adam Lundrigan, Frank Brückner and Martin Hujer for their efforts in making this happen. Thanks also to the many people who ran the ZF1 unit tests and reported their results! For a complete list of closed issues beginning with 1.12.3, visit: * https://github.com/zendframework/zf1/issues?labels=&milestone=&page=1&state=closed * http://framework.zend.com/changelog/ MIGRATION NOTES =============== A detailed list of migration notes may be found at: http://framework.zend.com/manual/en/migration.html SYSTEM REQUIREMENTS =================== Zend Framework requires PHP 5.2.11 or later. Please see our reference guide for more detailed system requirements: http://framework.zend.com/manual/en/requirements.html INSTALLATION ============ Please see [INSTALL.md](INSTALL.md). REPOSITORY HISTORY ================== This repository was created based on the release-1.12 branch of a Subversion repository, http://framework.zend.com/svn/framework/standard/. It contains a subset of the project history, dating from between the 1.5.0 and 1.6.0 releases, and only contains the tags for the 1.12 series. If you would like an older version, you may access the subversion repository linked above, or download an older version from http://framework.zend.com/downloads/archives. CONTRIBUTING ============ Please see [README-GIT.md](README-GIT.md) and [DEVELOPMENT_README.md](DEVELOPMENT_README.md). QUESTIONS AND FEEDBACK ====================== Online documentation can be found at http://framework.zend.com/manual. Questions that are not addressed in the manual should be directed to the appropriate mailing list: - http://framework.zend.com/wiki/display/ZFDEV/Mailing+Lists If you find code in this release behaving in an unexpected manner or contrary to its documented behavior, please create an issue in the Zend Framework issue tracker at: - https://github.com/zendframework/zf1/issues If you would like to be notified of new releases, you can subscribe to the fw-announce mailing list by sending a blank message to: - fw-announce-subscribe@lists.zend.com. LICENSE ======= The files in this archive are released under the Zend Framework license. You can find a copy of this license in [LICENSE.txt](LICENSE.txt). ACKNOWLEDGEMENTS ================ The Zend Framework team would like to thank all the contributors to the Zend Framework project, our corporate sponsor, and you, the Zend Framework user. Please visit us sometime soon at http://framework.zend.com. zf1-release-1.12.20/Vagrantfile000066400000000000000000000024731276427527200162040ustar00rootroot00000000000000# -*- mode: ruby -*- # vi: set ft=ruby : # Inline provisioning shell script @script = <'; return $scriptTag; } /** * Render dojo script tag * * Renders Dojo script tag by utilizing either local path provided or the * CDN. If any djConfig values were set, they will be serialized and passed * with that attribute. * * @return string */ protected function _renderDojoScriptTag() { if ($this->useCdn()) { $source = $this->getCdnBase() . $this->getCdnVersion() . $this->getCdnDojoPath(); } else { $source = $this->getLocalPath(); } $scriptTag = ''; return $scriptTag; } /** * Render layers (custom builds) as script tags * * @return string */ protected function _renderLayers() { $layers = $this->getLayers(); if (empty($layers)) { return ''; } $enc = 'UTF-8'; if ($this->view instanceof Zend_View_Interface && method_exists($this->view, 'getEncoding') ) { $enc = $this->view->getEncoding(); } $html = array(); foreach ($layers as $path) { $html[] = sprintf( '', htmlspecialchars($path, ENT_QUOTES, $enc) ); } return implode("\n", $html); } /** * Render dojo module paths and requires * * @return string */ protected function _renderExtras() { $js = array(); $modulePaths = $this->getModulePaths(); if (!empty($modulePaths)) { foreach ($modulePaths as $module => $path) { $js[] = 'dojo.registerModulePath("' . $this->view->escape($module) . '", "' . $this->view->escape($path) . '");'; } } $modules = $this->getModules(); if (!empty($modules)) { foreach ($modules as $module) { $js[] = 'dojo.require("' . $this->view->escape($module) . '");'; } } $onLoadActions = array(); // Get Zend specific onLoad actions; these will always be first to // ensure that dijits are created in the correct order foreach ($this->_getZendLoadActions() as $callback) { $onLoadActions[] = 'dojo.addOnLoad(' . $callback . ');'; } // Get all other onLoad actions foreach ($this->getOnLoadActions() as $callback) { $onLoadActions[] = 'dojo.addOnLoad(' . $callback . ');'; } $javascript = implode("\n ", $this->getJavascript()); $content = ''; if (!empty($js)) { $content .= implode("\n ", $js) . "\n"; } if (!empty($onLoadActions)) { $content .= implode("\n ", $onLoadActions) . "\n"; } if (!empty($javascript)) { $content .= $javascript . "\n"; } if (preg_match('/^\s*$/s', $content)) { return ''; } $html = ''; return $html; } /** * Add an onLoad action related to ZF dijit creation * * This method is public, but prefixed with an underscore to indicate that * it should not normally be called by userland code. It is pertinent to * ensuring that the correct order of operations occurs during dijit * creation. * * @param string $callback * @return Zend_Dojo_View_Helper_Dojo_Container */ public function _addZendLoad($callback) { if (!in_array($callback, $this->_zendLoadActions, true)) { $this->_zendLoadActions[] = $callback; } return $this; } /** * Retrieve all ZF dijit callbacks * * @return array */ public function _getZendLoadActions() { return $this->_zendLoadActions; } } zf1-release-1.12.20/library/Zend/Dojo/View/Helper/Editor.php000066400000000000000000000133361276427527200233460ustar00rootroot00000000000000 'LinkDialog', 'insertImage' => 'LinkDialog', 'fontName' => 'FontChoice', 'fontSize' => 'FontChoice', 'formatBlock' => 'FontChoice', 'foreColor' => 'TextColor', 'hiliteColor' => 'TextColor', 'enterKeyHandling' => 'EnterKeyHandling', 'fullScreen' => 'FullScreen', 'newPage' => 'NewPage', 'print' => 'Print', 'tabIndent' => 'TabIndent', 'toggleDir' => 'ToggleDir', 'viewSource' => 'ViewSource' ); /** * JSON-encoded parameters * @var array */ protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins'); /** * dijit.Editor * * @param string $id * @param string $value * @param array $params * @param array $attribs * @return string */ public function editor($id, $value = null, $params = array(), $attribs = array()) { if (isset($params['plugins'])) { foreach ($this->_getRequiredModules($params['plugins']) as $module) { $this->dojo->requireModule($module); } } // Previous versions allowed specifying "degrade" to allow using a // textarea instead of a div -- but this is insecure. Removing the // parameter if set to prevent its injection in the dijit. if (isset($params['degrade'])) { unset($params['degrade']); } $hiddenName = $id; if (array_key_exists('id', $attribs)) { $hiddenId = $attribs['id']; } else { $hiddenId = $hiddenName; } $hiddenId = $this->_normalizeId($hiddenId); $textareaName = $this->_normalizeEditorName($hiddenName); $textareaId = $hiddenId . '-Editor'; $hiddenAttribs = array( 'id' => $hiddenId, 'name' => $hiddenName, 'value' => $value, 'type' => 'hidden', ); $attribs['id'] = $textareaId; $this->_createGetParentFormFunction(); $this->_createEditorOnSubmit($hiddenId, $textareaId); $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); $html = '_htmlAttribs($attribs) . '>' . $value . "\n"; // Embed a textarea in a