Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit for webinar

  • Loading branch information...
commit 70a51bb8cebbc7622b02cc9ad542135eeea7d635 0 parents
Ryan Mauger authored
Showing with 30,836 additions and 0 deletions.
  1. +6 −0 .buildpath
  2. +29 −0 .project
  3. +12 −0 .settings/.jsdtscope
  4. +5 −0 .settings/org.eclipse.php.core.prefs
  5. +1 −0  .settings/org.eclipse.wst.jsdt.ui.superType.container
  6. +1 −0  .settings/org.eclipse.wst.jsdt.ui.superType.name
  7. +68 −0 .zfproject.xml
  8. +8 −0 application/Bootstrap.php
  9. +41 −0 application/configs/application.ini
  10. +58 −0 application/controllers/ErrorController.php
  11. +29 −0 application/controllers/IndexController.php
  12. +56 −0 application/entities/Application/Blog/Comment.php
  13. +72 −0 application/entities/Application/Blog/Post.php
  14. +29 −0 application/views/scripts/error/error.phtml
  15. 0  application/views/scripts/index/index.phtml
  16. +30 −0 docs/README.txt
  17. +203 −0 library/Doctrine/Access.php
  18. +34 −0 library/Doctrine/Adapter/Exception.php
  19. +47 −0 library/Doctrine/Adapter/Interface.php
  20. +294 −0 library/Doctrine/Adapter/Mock.php
  21. +319 −0 library/Doctrine/Adapter/Oracle.php
  22. +131 −0 library/Doctrine/Adapter/Statement.php
  23. +276 −0 library/Doctrine/Adapter/Statement/Interface.php
  24. +379 −0 library/Doctrine/Adapter/Statement/Mock.php
  25. +597 −0 library/Doctrine/Adapter/Statement/Oracle.php
  26. +170 −0 library/Doctrine/AuditLog.php
  27. +164 −0 library/Doctrine/AuditLog/Listener.php
  28. +91 −0 library/Doctrine/AuditLog/Listener/Microtime.php
  29. +56 −0 library/Doctrine/Builder.php
  30. +115 −0 library/Doctrine/Cache/Apc.php
  31. +108 −0 library/Doctrine/Cache/Array.php
  32. +232 −0 library/Doctrine/Cache/Db.php
  33. +280 −0 library/Doctrine/Cache/Driver.php
  34. +36 −0 library/Doctrine/Cache/Exception.php
  35. +70 −0 library/Doctrine/Cache/Interface.php
  36. +151 −0 library/Doctrine/Cache/Memcache.php
  37. +131 −0 library/Doctrine/Cache/Xcache.php
  38. +679 −0 library/Doctrine/Cli.php
  39. +160 −0 library/Doctrine/Cli/AnsiColorFormatter.php
  40. +34 −0 library/Doctrine/Cli/Exception.php
  41. +116 −0 library/Doctrine/Cli/Formatter.php
  42. +1,070 −0 library/Doctrine/Collection.php
  43. +34 −0 library/Doctrine/Collection/Exception.php
  44. +119 −0 library/Doctrine/Collection/Iterator.php
  45. +54 −0 library/Doctrine/Collection/Iterator/Expandable.php
  46. +42 −0 library/Doctrine/Collection/Iterator/Normal.php
  47. +37 −0 library/Doctrine/Collection/Iterator/Offset.php
  48. +65 −0 library/Doctrine/Collection/Offset.php
  49. +100 −0 library/Doctrine/Collection/OnDemand.php
  50. +163 −0 library/Doctrine/Column.php
  51. +81 −0 library/Doctrine/Common/Annotations/Annotation.php
  52. +54 −0 library/Doctrine/Common/Annotations/AnnotationException.php
  53. +248 −0 library/Doctrine/Common/Annotations/AnnotationReader.php
  54. +157 −0 library/Doctrine/Common/Annotations/Lexer.php
  55. +545 −0 library/Doctrine/Common/Annotations/Parser.php
  56. +226 −0 library/Doctrine/Common/Cache/AbstractCache.php
  57. +90 −0 library/Doctrine/Common/Cache/ApcCache.php
  58. +91 −0 library/Doctrine/Common/Cache/ArrayCache.php
  59. +71 −0 library/Doctrine/Common/Cache/Cache.php
  60. +123 −0 library/Doctrine/Common/Cache/MemcacheCache.php
  61. +105 −0 library/Doctrine/Common/Cache/XcacheCache.php
  62. +240 −0 library/Doctrine/Common/ClassLoader.php
  63. +438 −0 library/Doctrine/Common/Collections/ArrayCollection.php
  64. +243 −0 library/Doctrine/Common/Collections/Collection.php
  65. +28 −0 library/Doctrine/Common/CommonException.php
  66. +69 −0 library/Doctrine/Common/EventArgs.php
  67. +138 −0 library/Doctrine/Common/EventManager.php
  68. +45 −0 library/Doctrine/Common/EventSubscriber.php
  69. +255 −0 library/Doctrine/Common/Lexer.php
  70. +45 −0 library/Doctrine/Common/NotifyPropertyChanged.php
  71. +88 −0 library/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
  72. +66 −0 library/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php
  73. +127 −0 library/Doctrine/Common/Persistence/ObjectManager.php
  74. +65 −0 library/Doctrine/Common/Persistence/ObjectRepository.php
  75. +48 −0 library/Doctrine/Common/PropertyChangedListener.php
  76. +136 −0 library/Doctrine/Common/Util/Debug.php
  77. +72 −0 library/Doctrine/Common/Util/Inflector.php
  78. +55 −0 library/Doctrine/Common/Version.php
  79. +138 −0 library/Doctrine/Compiler.php
  80. +34 −0 library/Doctrine/Compiler/Exception.php
  81. +427 −0 library/Doctrine/Configurable.php
  82. +1,664 −0 library/Doctrine/Connection.php
  83. +57 −0 library/Doctrine/Connection/Common.php
  84. +64 −0 library/Doctrine/Connection/Db2.php
  85. +130 −0 library/Doctrine/Connection/Exception.php
  86. +51 −0 library/Doctrine/Connection/Mock.php
  87. +83 −0 library/Doctrine/Connection/Module.php
  88. +407 −0 library/Doctrine/Connection/Mssql.php
  89. +75 −0 library/Doctrine/Connection/Mssql/Exception.php
  90. +213 −0 library/Doctrine/Connection/Mysql.php
  91. +86 −0 library/Doctrine/Connection/Mysql/Exception.php
  92. +162 −0 library/Doctrine/Connection/Oracle.php
  93. +80 −0 library/Doctrine/Connection/Oracle/Exception.php
  94. +246 −0 library/Doctrine/Connection/Pgsql.php
  95. +108 −0 library/Doctrine/Connection/Pgsql/Exception.php
  96. +182 −0 library/Doctrine/Connection/Profiler.php
  97. +35 −0 library/Doctrine/Connection/Profiler/Exception.php
  98. +129 −0 library/Doctrine/Connection/Sqlite.php
  99. +78 −0 library/Doctrine/Connection/Sqlite/Exception.php
  100. +484 −0 library/Doctrine/Connection/Statement.php
  101. +960 −0 library/Doctrine/Connection/UnitOfWork.php
  102. +1,223 −0 library/Doctrine/Core.php
  103. +64 −0 library/Doctrine/DBAL/Configuration.php
  104. +1,052 −0 library/Doctrine/DBAL/Connection.php
  105. +54 −0 library/Doctrine/DBAL/ConnectionException.php
  106. +88 −0 library/Doctrine/DBAL/DBALException.php
  107. +72 −0 library/Doctrine/DBAL/Driver.php
  108. +42 −0 library/Doctrine/DBAL/Driver/Connection.php
  109. +115 −0 library/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
  110. +108 −0 library/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php
  111. +27 −0 library/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php
  112. +297 −0 library/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
  113. +95 −0 library/Doctrine/DBAL/Driver/OCI8/Driver.php
  114. +160 −0 library/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
  115. +30 −0 library/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php
  116. +220 −0 library/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
  117. +40 −0 library/Doctrine/DBAL/Driver/PDOConnection.php
  118. +126 −0 library/Doctrine/DBAL/Driver/PDOIbm/Driver.php
  119. +95 −0 library/Doctrine/DBAL/Driver/PDOMySql/Driver.php
  120. +88 −0 library/Doctrine/DBAL/Driver/PDOOracle/Driver.php
  121. +70 −0 library/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
  122. +116 −0 library/Doctrine/DBAL/Driver/PDOSqlite/Driver.php
  123. +45 −0 library/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
  124. +86 −0 library/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php
  125. +33 −0 library/Doctrine/DBAL/Driver/PDOStatement.php
  126. +200 −0 library/Doctrine/DBAL/Driver/Statement.php
  127. +161 −0 library/Doctrine/DBAL/DriverManager.php
  128. +79 −0 library/Doctrine/DBAL/Event/ConnectionEventArgs.php
  129. +75 −0 library/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
  130. +82 −0 library/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
  131. +38 −0 library/Doctrine/DBAL/Events.php
  132. +42 −0 library/Doctrine/DBAL/LockMode.php
  133. +67 −0 library/Doctrine/DBAL/Logging/DebugStack.php
  134. +61 −0 library/Doctrine/DBAL/Logging/EchoSQLLogger.php
  135. +54 −0 library/Doctrine/DBAL/Logging/SQLLogger.php
  136. +2,047 −0 library/Doctrine/DBAL/Platforms/AbstractPlatform.php
  137. +564 −0 library/Doctrine/DBAL/Platforms/DB2Platform.php
  138. +788 −0 library/Doctrine/DBAL/Platforms/MsSqlPlatform.php
  139. +602 −0 library/Doctrine/DBAL/Platforms/MySqlPlatform.php
  140. +724 −0 library/Doctrine/DBAL/Platforms/OraclePlatform.php
  141. +710 −0 library/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
  142. +474 −0 library/Doctrine/DBAL/Platforms/SqlitePlatform.php
  143. +121 −0 library/Doctrine/DBAL/Schema/AbstractAsset.php
  144. +777 −0 library/Doctrine/DBAL/Schema/AbstractSchemaManager.php
  145. +346 −0 library/Doctrine/DBAL/Schema/Column.php
  146. +58 −0 library/Doctrine/DBAL/Schema/ColumnDiff.php
  147. +367 −0 library/Doctrine/DBAL/Schema/Comparator.php
  148. +38 −0 library/Doctrine/DBAL/Schema/Constraint.php
  149. +186 −0 library/Doctrine/DBAL/Schema/DB2SchemaManager.php
  150. +164 −0 library/Doctrine/DBAL/Schema/ForeignKeyConstraint.php
  151. +176 −0 library/Doctrine/DBAL/Schema/Index.php
  152. +172 −0 library/Doctrine/DBAL/Schema/MsSqlSchemaManager.php
  153. +191 −0 library/Doctrine/DBAL/Schema/MySqlSchemaManager.php
  154. +282 −0 library/Doctrine/DBAL/Schema/OracleSchemaManager.php
Sorry, we could not display the entire diff because too many files (787) changed.
6 .buildpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<buildpath>
+ <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
+ <buildpathentry kind="con" path="org.zend.php.framework.CONTAINER"/>
+ <buildpathentry kind="src" path=""/>
+</buildpath>
29 .project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>d2-mongo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.dltk.core.scriptbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.zend.php.framework.ZendFrameworkNature</nature>
+ <nature>org.eclipse.php.core.PHPNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
12 .settings/.jsdtscope
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path=""/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
5 .settings/org.eclipse.php.core.prefs
@@ -0,0 +1,5 @@
+#Thu May 26 14:13:22 BST 2011
+eclipse.preferences.version=1
+include_path=0;/d2-mongo\u00055;org.zend.php.framework.CONTAINER
+phpVersion=php5.3
+use_asp_tags_as_php=false
1  .settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
1  .settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
68 .zfproject.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<projectProfile type="default" version="1.11.5">
+ <projectDirectory>
+ <projectProfileFile filesystemName=".zfproject.xml"/>
+ <applicationDirectory classNamePrefix="Application_">
+ <apisDirectory enabled="false"/>
+ <configsDirectory>
+ <applicationConfigFile type="ini"/>
+ </configsDirectory>
+ <controllersDirectory>
+ <controllerFile controllerName="Index">
+ <actionMethod actionName="index"/>
+ </controllerFile>
+ <controllerFile controllerName="Error"/>
+ </controllersDirectory>
+ <formsDirectory enabled="false"/>
+ <layoutsDirectory enabled="false"/>
+ <modelsDirectory/>
+ <modulesDirectory enabled="false"/>
+ <viewsDirectory>
+ <viewScriptsDirectory>
+ <viewControllerScriptsDirectory forControllerName="Index">
+ <viewScriptFile forActionName="index"/>
+ </viewControllerScriptsDirectory>
+ <viewControllerScriptsDirectory forControllerName="Error">
+ <viewScriptFile forActionName="error"/>
+ </viewControllerScriptsDirectory>
+ </viewScriptsDirectory>
+ <viewHelpersDirectory/>
+ <viewFiltersDirectory enabled="false"/>
+ </viewsDirectory>
+ <bootstrapFile filesystemName="Bootstrap.php"/>
+ </applicationDirectory>
+ <dataDirectory enabled="false">
+ <cacheDirectory enabled="false"/>
+ <searchIndexesDirectory enabled="false"/>
+ <localesDirectory enabled="false"/>
+ <logsDirectory enabled="false"/>
+ <sessionsDirectory enabled="false"/>
+ <uploadsDirectory enabled="false"/>
+ </dataDirectory>
+ <docsDirectory>
+ <file filesystemName="README.txt"/>
+ </docsDirectory>
+ <libraryDirectory>
+ <zfStandardLibraryDirectory enabled="false"/>
+ </libraryDirectory>
+ <publicDirectory>
+ <publicStylesheetsDirectory enabled="false"/>
+ <publicScriptsDirectory enabled="false"/>
+ <publicImagesDirectory enabled="false"/>
+ <publicIndexFile filesystemName="index.php"/>
+ <htaccessFile filesystemName=".htaccess"/>
+ </publicDirectory>
+ <projectProvidersDirectory enabled="false"/>
+ <temporaryDirectory enabled="false"/>
+ <testsDirectory>
+ <testPHPUnitConfigFile filesystemName="phpunit.xml"/>
+ <testPHPUnitBootstrapFile filesystemName="bootstrap.php"/>
+ <testApplicationDirectory>
+ <testApplicationControllerDirectory>
+ <testApplicationControllerFile forControllerName="Index"/>
+ </testApplicationControllerDirectory>
+ </testApplicationDirectory>
+ <testLibraryDirectory/>
+ </testsDirectory>
+ </projectDirectory>
+</projectProfile>
8 application/Bootstrap.php
@@ -0,0 +1,8 @@
+<?php
+
+class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
+{
+
+
+}
+
41 application/configs/application.ini
@@ -0,0 +1,41 @@
+[production]
+; PHP settings
+phpSettings.display_startup_errors = 0
+phpSettings.display_errors = 0
+
+; Set Plugin path for lupi mongoodm resource
+pluginPaths.Lupi_Resource = APPLICATION_PATH "/../library/Lupi/Resource"
+
+; Library include paths & namespaces
+includePaths.library = APPLICATION_PATH "/../library"
+autoloaderNamespaces[] = "Lupi\"
+autoloaderNamespaces[] = "Doctrine\"
+
+; Bootstrap options
+bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
+bootstrap.class = "Bootstrap"
+
+; Applicaiton Setup
+appnamespace = "Application"
+resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
+resources.frontController.params.displayExceptions = 0
+
+; ODM settings
+resources.odm.documents.dir = APPLICATION_PATH "/entities"
+resources.odm.documents.namespace = "Application"
+resources.odm.config.proxyDir = APPLICATION_PATH "/cache/proxies"
+resources.odm.config.proxyNamespace = "proxies"
+resources.odm.config.hydratorDir = APPLICATION_PATH "/cache/hydrators"
+resources.odm.config.hydratorNamespace = "hydrators"
+
+
+[staging : production]
+
+[testing : production]
+phpSettings.display_startup_errors = 1
+phpSettings.display_errors = 1
+
+[development : production]
+phpSettings.display_startup_errors = 1
+phpSettings.display_errors = 1
+resources.frontController.params.displayExceptions = 1
58 application/controllers/ErrorController.php
@@ -0,0 +1,58 @@
+<?php
+
+class ErrorController extends Zend_Controller_Action
+{
+
+ public function errorAction()
+ {
+ $errors = $this->_getParam('error_handler');
+
+ if (!$errors || !$errors instanceof ArrayObject) {
+ $this->view->message = 'You have reached the error page';
+ return;
+ }
+
+ switch ($errors->type) {
+ case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
+ case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
+ case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
+ // 404 error -- controller or action not found
+ $this->getResponse()->setHttpResponseCode(404);
+ $priority = Zend_Log::NOTICE;
+ $this->view->message = 'Page not found';
+ break;
+ default:
+ // application error
+ $this->getResponse()->setHttpResponseCode(500);
+ $priority = Zend_Log::CRIT;
+ $this->view->message = 'Application error';
+ break;
+ }
+
+ // Log exception, if logger available
+ if ($log = $this->getLog()) {
+ $log->log($this->view->message, $priority, $errors->exception);
+ $log->log('Request Parameters', $priority, $errors->request->getParams());
+ }
+
+ // conditionally display exceptions
+ if ($this->getInvokeArg('displayExceptions') == true) {
+ $this->view->exception = $errors->exception;
+ }
+
+ $this->view->request = $errors->request;
+ }
+
+ public function getLog()
+ {
+ $bootstrap = $this->getInvokeArg('bootstrap');
+ if (!$bootstrap->hasResource('Log')) {
+ return false;
+ }
+ $log = $bootstrap->getResource('Log');
+ return $log;
+ }
+
+
+}
+
29 application/controllers/IndexController.php
@@ -0,0 +1,29 @@
+<?php
+use Lupi\Controller as controller;
+
+class IndexController extends controller\Action
+{
+ /**
+ * @var \Doctrine\ODM\MongoDB\DocumentRepository
+ */
+ protected $repository;
+
+ public function init()
+ {
+ $this->repository = $this->dm->getRepository('\\Application\\Blog\\Post');
+ }
+
+ public function indexAction()
+ {
+ $post = $this->repository->find('4dde4067fbd2237df1000000');
+ $comment = new \Application\Blog\Comment();
+ $comment->setEmail('foo@test.com')
+ ->setComment('nice post!');
+ $post->addComment($comment);
+ $this->dm->persist($post);
+ $this->dm->flush();
+ }
+
+
+}
+
56 application/entities/Application/Blog/Comment.php
@@ -0,0 +1,56 @@
+<?php
+namespace Application\Blog;
+
+/**
+ * @EmbeddedDocument
+ */
+class Comment
+{
+ /**
+ * @Id
+ */
+ private $id;
+
+ /**
+ * @String
+ */
+ private $email;
+
+ /**
+ * @String
+ */
+ private $comment;
+
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ public function setId($id)
+ {
+ $this->id = (string) $id;
+ return $this;
+ }
+
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+ public function setEmail($email)
+ {
+ $this->email = (string) $email;
+ return $this;
+ }
+
+ public function getComment()
+ {
+ return $this->comment;
+ }
+
+ public function setComment($comment)
+ {
+ $this->comment = (string) $comment;
+ return $this;
+ }
+}
72 application/entities/Application/Blog/Post.php
@@ -0,0 +1,72 @@
+<?php
+namespace Application\Blog;
+
+/**
+ * @Document(db="blog", collection="posts")
+ */
+class Post
+{
+ /**
+ * @Id
+ */
+ private $id;
+
+ /**
+ * @Field(type="string")
+ */
+ private $title;
+
+ /**
+ * @String
+ */
+ private $content;
+
+ /**
+ * @EmbedMany(targetDocument="Application\Blog\Comment")
+ */
+ private $comments = array();
+
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ public function setId($id)
+ {
+ $this->id = (string) $id;
+ return $this;
+ }
+
+ public function getTitle()
+ {
+ return $this->title;
+ }
+
+ public function setTitle($title)
+ {
+ $this->title = (string) $title;
+ return $this;
+ }
+
+ public function getContent()
+ {
+ return $this->content;
+ }
+
+ public function setContent($content)
+ {
+ $this->content = (string) $content;
+ return $this;
+ }
+
+ public function getComments()
+ {
+ return $this->comments;
+ }
+
+ public function addComment(\Application\Blog\Comment $comment)
+ {
+ $this->comments[] = $comment;
+ return $this;
+ }
+}
29 application/views/scripts/error/error.phtml
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Zend Framework Default Application</title>
+</head>
+<body>
+ <h1>An error occurred</h1>
+ <h2><?php echo $this->message ?></h2>
+
+ <?php if (isset($this->exception)): ?>
+
+ <h3>Exception information:</h3>
+ <p>
+ <b>Message:</b> <?php echo $this->exception->getMessage() ?>
+ </p>
+
+ <h3>Stack trace:</h3>
+ <pre><?php echo $this->exception->getTraceAsString() ?>
+ </pre>
+
+ <h3>Request Parameters:</h3>
+ <pre><?php echo $this->escape(var_export($this->request->getParams(), true)) ?>
+ </pre>
+
+ <?php endif ?>
+
+</body>
+</html>
0  application/views/scripts/index/index.phtml
No changes.
30 docs/README.txt
@@ -0,0 +1,30 @@
+README
+======
+
+This directory should be used to place project specfic documentation including
+but not limited to project notes, generated API/phpdoc documentation, or
+manual files generated or hand written. Ideally, this directory would remain
+in your development environment only and should not be deployed with your
+application to it's final production location.
+
+
+Setting Up Your VHOST
+=====================
+
+The following is a sample VHOST you might want to consider for your project.
+
+<VirtualHost *:80>
+ DocumentRoot "/Users/ryanmauger/Projects/zf-d2mongo/public"
+ ServerName zf-d2mongo.local
+
+ # This should be omitted in the production environment
+ SetEnv APPLICATION_ENV development
+
+ <Directory "/Users/ryanmauger/Projects/zf-d2mongo/public">
+ Options Indexes MultiViews FollowSymLinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+</VirtualHost>
203 library/Doctrine/Access.php
@@ -0,0 +1,203 @@
+<?php
+/*
+ * $Id: Access.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Provides array access and property overload interface for Doctrine subclasses
+ *
+ * @package Doctrine
+ * @subpackage Access
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ */
+abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements ArrayAccess
+{
+ /**
+ * Set an entire aray to the data
+ *
+ * @param array $array An array of key => value pairs
+ * @return Doctrine_Access
+ */
+ public function setArray(array $array)
+ {
+ foreach ($array as $k => $v) {
+ $this->set($k, $v);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Set key and value to data
+ *
+ * @see set, offsetSet
+ * @param $name
+ * @param $value
+ * @return void
+ */
+ public function __set($name, $value)
+ {
+ $this->set($name, $value);
+ }
+
+ /**
+ * Get key from data
+ *
+ * @see get, offsetGet
+ * @param mixed $name
+ * @return mixed
+ */
+ public function __get($name)
+ {
+ return $this->get($name);
+ }
+
+ /**
+ * Check if key exists in data
+ *
+ * @param string $name
+ * @return boolean whether or not this object contains $name
+ */
+ public function __isset($name)
+ {
+ return $this->contains($name);
+ }
+
+ /**
+ * Remove key from data
+ *
+ * @param string $name
+ * @return void
+ */
+ public function __unset($name)
+ {
+ return $this->remove($name);
+ }
+
+ /**
+ * Check if an offset axists
+ *
+ * @param mixed $offset
+ * @return boolean Whether or not this object contains $offset
+ */
+ public function offsetExists($offset)
+ {
+ return $this->contains($offset);
+ }
+
+ /**
+ * An alias of get()
+ *
+ * @see get, __get
+ * @param mixed $offset
+ * @return mixed
+ */
+ public function offsetGet($offset)
+ {
+ return $this->get($offset);
+ }
+
+ /**
+ * Sets $offset to $value
+ *
+ * @see set, __set
+ * @param mixed $offset
+ * @param mixed $value
+ * @return void
+ */
+ public function offsetSet($offset, $value)
+ {
+ if ( ! isset($offset)) {
+ $this->add($value);
+ } else {
+ $this->set($offset, $value);
+ }
+ }
+
+ /**
+ * Unset a given offset
+ *
+ * @see set, offsetSet, __set
+ * @param mixed $offset
+ */
+ public function offsetUnset($offset)
+ {
+ return $this->remove($offset);
+ }
+
+ /**
+ * Remove the element with the specified offset
+ *
+ * @param mixed $offset The offset to remove
+ * @return boolean True if removed otherwise false
+ */
+ public function remove($offset)
+ {
+ throw new Doctrine_Exception('Remove is not supported for ' . get_class($this));
+ }
+
+ /**
+ * Return the element with the specified offset
+ *
+ * @param mixed $offset The offset to return
+ * @return mixed
+ */
+ public function get($offset)
+ {
+ throw new Doctrine_Exception('Get is not supported for ' . get_class($this));
+ }
+
+ /**
+ * Set the offset to the value
+ *
+ * @param mixed $offset The offset to set
+ * @param mixed $value The value to set the offset to
+ *
+ */
+ public function set($offset, $value)
+ {
+ throw new Doctrine_Exception('Set is not supported for ' . get_class($this));
+ }
+
+ /**
+ * Check if the specified offset exists
+ *
+ * @param mixed $offset The offset to check
+ * @return boolean True if exists otherwise false
+ */
+ public function contains($offset)
+ {
+ throw new Doctrine_Exception('Contains is not supported for ' . get_class($this));
+ }
+
+ /**
+ * Add the value
+ *
+ * @param mixed $value The value to add
+ * @return void
+ */
+ public function add($value)
+ {
+ throw new Doctrine_Exception('Add is not supported for ' . get_class($this));
+ }
+}
34 library/Doctrine/Adapter/Exception.php
@@ -0,0 +1,34 @@
+<?php
+/*
+ * $Id$
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Doctrine_Adapter exception class
+ *
+ * @package Doctrine
+ * @subpackage Adapter
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision$
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ */
+class Doctrine_Adapter_Exception extends Doctrine_Exception
+{ }
47 library/Doctrine/Adapter/Interface.php
@@ -0,0 +1,47 @@
+<?php
+/*
+ * $Id: Interface.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * This adapter interface should be implemented by all custom adapters
+ *
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @package Doctrine
+ * @subpackage Adapter
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ */
+interface Doctrine_Adapter_Interface
+{
+ public function prepare($prepareString);
+ public function query($queryString);
+ public function quote($input);
+ public function exec($statement);
+ public function lastInsertId();
+ public function beginTransaction();
+ public function commit();
+ public function rollBack();
+ public function errorCode();
+ public function errorInfo();
+ public function setAttribute($attribute, $value);
+ public function getAttribute($attribute);
+}
294 library/Doctrine/Adapter/Mock.php
@@ -0,0 +1,294 @@
+<?php
+/*
+ * $Id: Mock.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Doctrine mock connection adapter. This class is used for special testing purposes.
+ *
+ * @package Doctrine
+ * @subpackage Adapter
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ */
+class Doctrine_Adapter_Mock implements Doctrine_Adapter_Interface, Countable
+{
+ /**
+ * Name of the dbms to mock
+ *
+ * @var string
+ */
+ private $_name;
+
+ /**
+ * Array of queries executed through this instance of the mock adapter
+ *
+ * @var array $queries
+ */
+ private $_queries = array();
+
+ /**
+ * Array of exceptions thrown
+ *
+ * @var array $exceptions
+ */
+ private $_exception = array();
+
+ /**
+ * Bool true/false variable for whether or not the last insert failed
+ *
+ * @var boolean $lastInsertIdFail
+ */
+ private $_lastInsertIdFail = false;
+
+ /**
+ * Doctrine mock adapter constructor
+ *
+ * <code>
+ * $conn = new Doctrine_Adapter_Mock('mysql');
+ * </code>
+ *
+ * @param string $name
+ * @return void
+ */
+ public function __construct($name = null)
+ {
+ $this->_name = $name;
+ }
+
+ /**
+ * Get the name of the dbms used in this instance of the mock adapter
+ *
+ * @return string $name Name of the dbms
+ */
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ /**
+ * Pop the last executed query from the array of executed queries and return it
+ *
+ * @return string $sql Last executed sql string
+ */
+ public function pop()
+ {
+ return array_pop($this->_queries);
+ }
+
+ /**
+ * Force an exception in to the array of exceptions
+ *
+ * @param string $name Name of exception
+ * @param string $message Message for the exception
+ * @param integer $code Code of the exception
+ * @return void
+ */
+ public function forceException($name, $message = '', $code = 0)
+ {
+ $this->_exception = array($name, $message, $code);
+ }
+
+ /**
+ * Prepare a query statement
+ *
+ * @param string $query Query to prepare
+ * @return Doctrine_Adapter_Statement_Mock $mock Mock prepared statement
+ */
+ public function prepare($query)
+ {
+ $mock = new Doctrine_Adapter_Statement_Mock($this, $query);
+ $mock->queryString = $query;
+
+ return $mock;
+ }
+
+ /**
+ * Add query to the stack of executed queries
+ *
+ * @param string $query
+ * @return void
+ */
+ public function addQuery($query)
+ {
+ $this->_queries[] = $query;
+ }
+
+ /**
+ * Fake the execution of query and add it to the stack of executed queries
+ *
+ * @param string $query
+ * @return Doctrine_Adapter_Statement_Mock $stmt
+ */
+ public function query($query)
+ {
+ $this->_queries[] = $query;
+
+ $e = $this->_exception;
+
+ if ( ! empty($e)) {
+ $name = $e[0];
+
+ $this->_exception = array();
+
+ throw new $name($e[1], $e[2]);
+ }
+
+ $stmt = new Doctrine_Adapter_Statement_Mock($this, $query);
+ $stmt->queryString = $query;
+
+ return $stmt;
+ }
+
+ /**
+ * Get all the executed queries
+ *
+ * @return array $queries Array of all executed queries
+ */
+ public function getAll()
+ {
+ return $this->_queries;
+ }
+
+ /**
+ * Quote a value for the dbms
+ *
+ * @param string $input
+ * @return string $quoted
+ */
+ public function quote($input)
+ {
+ return "'" . addslashes($input) . "'";
+ }
+
+ /**
+ * Execute a raw sql statement
+ *
+ * @param string $statement
+ * @return void
+ */
+ public function exec($statement)
+ {
+ $this->_queries[] = $statement;
+
+ $e = $this->_exception;
+
+ if ( ! empty($e)) {
+ $name = $e[0];
+
+ $this->_exception = array();
+
+ throw new $name($e[1], $e[2]);
+ }
+
+ return 0;
+ }
+
+ /**
+ * Force last insert to be failed
+ *
+ * @param boolean $fail
+ * @return void
+ */
+ public function forceLastInsertIdFail($fail = true)
+ {
+ if ($fail) {
+ $this->_lastInsertIdFail = true;
+ } else {
+ $this->_lastInsertIdFail = false;
+ }
+ }
+
+ /**
+ * Get the id of the last inserted record
+ *
+ * @return integer $id
+ */
+ public function lastInsertId()
+ {
+ $this->_queries[] = 'LAST_INSERT_ID()';
+ if ($this->_lastInsertIdFail) {
+ return null;
+ } else {
+ return 1;
+ }
+ }
+
+ /**
+ * Get the number of queries executed
+ *
+ * @return integer $count
+ */
+ public function count()
+ {
+ return count($this->_queries);
+ }
+
+ /**
+ * Begin a transaction
+ *
+ * @return void
+ */
+ public function beginTransaction()
+ {
+ $this->_queries[] = 'BEGIN TRANSACTION';
+ }
+
+ /**
+ * Commit a transaction
+ *
+ * @return void
+ */
+ public function commit()
+ {
+ $this->_queries[] = 'COMMIT';
+ }
+
+ /**
+ * Rollback a transaction
+ *
+ * @return void
+ */
+ public function rollBack()
+ {
+ $this->_queries[] = 'ROLLBACK';
+ }
+
+ public function getAttribute($attribute)
+ {
+ if ($attribute == Doctrine_Core::ATTR_DRIVER_NAME) {
+ return strtolower($this->_name);
+ }
+ }
+
+ public function errorCode()
+ { }
+
+ public function errorInfo()
+ { }
+
+ public function setAttribute($attribute, $value)
+ { }
+
+ public function sqliteCreateFunction()
+ { }
+}
319 library/Doctrine/Adapter/Oracle.php
@@ -0,0 +1,319 @@
+<?php
+/*
+ * $Id$
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Custom Doctrine connection adapter for oracle
+ *
+ * @package Doctrine
+ * @subpackage Adapter
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @author vadik56
+ * @author Miloslav Kmet <adrive-nospam@hip-hop.sk>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision$
+ */
+
+class Doctrine_Adapter_Oracle implements Doctrine_Adapter_Interface
+{
+ /**
+ * execution mode
+ */
+ protected $executeMode = OCI_COMMIT_ON_SUCCESS;
+
+ /**
+ * Resource representing connection to database
+ */
+ protected $connection = false;
+
+
+ protected $attributes = array(Doctrine_Core::ATTR_DRIVER_NAME => "oci8",
+ Doctrine_Core::ATTR_ERRMODE => Doctrine_Core::ERRMODE_SILENT);
+
+ /**
+ * User-provided configuration.
+ *
+ * Basic keys are:
+ *
+ * username => (string) Connect to the database as this username.
+ * password => (string) Password associated with the username.
+ * dbname => Either the name of the local Oracle instance, or the
+ * name of the entry in tnsnames.ora to which you want to connect.
+ *
+ * @var array
+ */
+ protected $config = array(
+ 'dbname' => null,
+ 'username' => null,
+ 'password' => null,
+ 'charset' => null,
+ 'persistent' => false
+ );
+
+ /**
+ * Doctrine Oracle adapter constructor
+ *
+ * <code>
+ * $conn = new Doctrine_Adapter_Oracle(array('dbname'=>'db','username'=>'usr','password'=>'pass'));
+ * </code>
+ *
+ * or
+ *
+ * <code>
+ * Doctrine_Manager::connection(array('oracle:dbname=SID;charset=NLS_CHARACTERSET;persistent=true','usr', 'pass'),"doctrine_connection_name")
+ * </code>
+ *
+ * @param string $name
+ * @return void
+ */
+ public function __construct($config = array(), $username = null, $password = null)
+ {
+ if (is_string($config))
+ {
+ $config = str_replace("oracle:","",$config);
+ $parts = explode(";", $config);
+ foreach($parts as $part) {
+ $e = explode("=", $part);
+ $key = array_shift($e);
+ $this->config[$key] = implode('=', $e);
+ }
+
+ if ($username) {
+ $this->config['username'] = $username;
+ }
+ if ($password) {
+ $this->config['password'] = $password;
+ }
+ } else {
+ if ( ! isset($config['password']) || ! isset($config['username'])) {
+ throw new Doctrine_Adapter_Exception('config array must have at least a username and a password');
+ }
+
+ $this->config['username'] = $config['username'];
+ $this->config['password'] = $config['password'];
+ $this->config['dbname'] = $config['dbname'];
+
+ if (isset($config['charset'])) {
+ $this->config['charset'] = $config['charset'];
+ }
+
+ if (isset($config['persistent'])) {
+ $this->config['persistent'] = $config['persistent'];
+ }
+ }
+
+
+ if ($this->config['persistent'] == 'true'){
+ $this->connection = @oci_pconnect($this->config['username'], $this->config['password'],
+ $this->config['dbname'], $this->config['charset']);
+ } else {
+ $this->connection = @oci_new_connect($this->config['username'], $this->config['password'],
+ $this->config['dbname'], $this->config['charset']);
+ }
+
+ if ($this->connection === false) {
+ throw new Doctrine_Adapter_Exception(sprintf("Unable to Connect to :'%s' as '%s'", $this->config['dbname'], $this->config['username']));
+ }
+ }
+
+ /**
+ * Prepare a query statement
+ *
+ * @param string $query Query to prepare
+ * @return Doctrine_Adapter_Statement_Oracle $stmt prepared statement
+ */
+ public function prepare($query)
+ {
+ $stmt = new Doctrine_Adapter_Statement_Oracle($this, $query, $this->executeMode);
+
+ return $stmt;
+ }
+
+ /**
+ * Execute query and return results as statement object
+ *
+ * @param string $query
+ * @return Doctrine_Adapter_Statement_Oracle $stmt
+ */
+ public function query($query)
+ {
+ $stmt = new Doctrine_Adapter_Statement_Oracle($this, $query, $this->executeMode);
+ $stmt->execute();
+
+ return $stmt;
+ }
+
+ /**
+ * Quote a value for the dbms
+ *
+ * @param string $input
+ * @return string $quoted
+ */
+ public function quote($input)
+ {
+ return "'" . str_replace("'","''",$input) . "'";
+ }
+
+ /**
+ * Execute a raw sql statement
+ *
+ * @param string $statement
+ * @return void
+ */
+ public function exec($statement)
+ {
+ $stmt = new Doctrine_Adapter_Statement_Oracle($this, $statement, $this->executeMode);
+ $stmt->execute();
+ $count = $stmt->rowCount();
+
+ return $count;
+ }
+
+ /**
+ * Get the id of the last inserted record
+ *
+ * @return integer $id
+ */
+ public function lastInsertId()
+ {
+ throw new Doctrine_Adapter_Exception("unsupported");
+ }
+
+ /**
+ * Begin a transaction
+ *
+ * @return boolean
+ */
+ public function beginTransaction()
+ {
+ $this->executeMode = OCI_DEFAULT;
+ return true;
+ }
+
+ /**
+ * Commit a transaction
+ *
+ * @return void
+ */
+ public function commit()
+ {
+ return @oci_commit($this->connection);
+ }
+
+ /**
+ * Rollback a transaction
+ *
+ * @return boolean
+ */
+ public function rollBack()
+ {
+ return @oci_rollback($this->connection);
+ }
+
+ /**
+ * Set connection attribute
+ *
+ * @param integer $attribute
+ * @param mixed $value the value of given attribute
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function setAttribute($attribute, $value)
+ {
+ switch ($attribute) {
+ case Doctrine_Core::ATTR_DRIVER_NAME:
+ //TODO throw an error since driver name can not be changed
+ case Doctrine_Core::ATTR_ERRMODE:
+ break;
+ case Doctrine_Core::ATTR_CASE:
+ if ($value == Doctrine_Core::CASE_NATURAL) {
+ break;
+ } else {
+ throw new Doctrine_Adapter_Exception("Unsupported Option for ATTR_CASE: $value");
+ }
+ default:
+ throw new Doctrine_Adapter_Exception("Unsupported Attribute: $attribute");
+ return false;
+ }
+ $this->attributes[$attribute] = $value;
+ return true;
+ }
+
+ /**
+ * Retrieve a statement attribute
+ *
+ * @param integer $attribute
+ * @see Doctrine_Core::ATTR_* constants
+ * @return mixed the attribute value
+ */
+ public function getAttribute($attribute)
+ {
+ return $this->attributes[$attribute];
+ }
+
+ /**
+ * Returns established OCI connection handler
+ *
+ * @return resource OCI connection handler
+ */
+ public function getConnection()
+ {
+ return $this->connection;
+ }
+
+ /**
+ * Returns current user name
+ *
+ * @return string current user name
+ */
+ public function getUserName()
+ {
+ return $this->config['username'];
+ }
+
+ public function errorCode()
+ {
+ if (is_resource($this->connection)) {
+ $error = @oci_error($this->connection);
+ } else {
+ $error = @oci_error();
+ }
+ return $error['code'];
+ }
+
+ public function errorInfo()
+ {
+ if (is_resource($this->connection)) {
+ $error = @oci_error($this->connection);
+ } else {
+ $error = @oci_error();
+ }
+ return $error['message'];
+ }
+
+ public function __destruct()
+ {
+ if (is_resource($this->connection)) {
+ @oci_rollback($this->connection);
+ @oci_close($this->connection);
+ }
+ }
+}
131 library/Doctrine/Adapter/Statement.php
@@ -0,0 +1,131 @@
+<?php
+/*
+ * $Id: Statement.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Doctrine_Adapter_Statement
+ *
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @package Doctrine
+ * @subpackage Adapter
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ */
+abstract class Doctrine_Adapter_Statement
+{
+ /**
+ * bindValue
+ *
+ * @param string $no
+ * @param string $value
+ * @return void
+ */
+ public function bindValue($no, $value)
+ { }
+
+ /**
+ * fetch
+ *
+ * @see Doctrine_Core::FETCH_* constants
+ * @param integer $fetchStyle Controls how the next row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
+ * defaulting to Doctrine_Core::FETCH_BOTH
+ *
+ * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor,
+ * this value determines which row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_ORI_* constants, defaulting to
+ * Doctrine_Core::FETCH_ORI_NEXT. To request a scrollable cursor for your
+ * Doctrine_Adapter_Statement_Interface object,
+ * you must set the Doctrine_Core::ATTR_CURSOR attribute to Doctrine_Core::CURSOR_SCROLL when you
+ * prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
+ *
+ * @param integer $cursorOffset For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the
+ * $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_ABS, this value specifies
+ * the absolute number of the row in the result set that shall be fetched.
+ *
+ * For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for
+ * which the $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_REL, this value
+ * specifies the row to fetch relative to the cursor position before
+ * Doctrine_Adapter_Statement_Interface->fetch() was called.
+ *
+ * @return mixed
+ */
+ public function fetch()
+ { }
+
+ /**
+ * nextRowSet
+ *
+ * @return void
+ */
+ public function nextRowset()
+ { }
+
+ /**
+ * execute()
+ *
+ * @return void
+ */
+ public function execute()
+ { }
+
+ /**
+ * errorCode
+ *
+ * @return void
+ */
+ public function errorCode()
+ { }
+
+ /**
+ * errorInfo
+ *
+ * @return void
+ */
+ public function errorInfo()
+ { }
+
+ /**
+ * rowCount
+ *
+ * @return void
+ */
+ public function rowCount()
+ { }
+
+ /**
+ * setFetchMode
+ *
+ * @param string $mode
+ * @return void
+ */
+ public function setFetchMode($mode)
+ { }
+
+ /**
+ * columnCount
+ *
+ * @return void
+ */
+ public function columnCount()
+ { }
+}
276 library/Doctrine/Adapter/Statement/Interface.php
@@ -0,0 +1,276 @@
+<?php
+/*
+ * $Id: Interface.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Interface for Doctrine adapter statements
+ *
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @package Doctrine
+ * @subpackage Adapter
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ */
+interface Doctrine_Adapter_Statement_Interface
+{
+ /**
+ * Bind a column to a PHP variable
+ *
+ * @param mixed $column Number of the column (1-indexed) or name of the column in the result set.
+ * If using the column name, be aware that the name should match
+ * the case of the column, as returned by the driver.
+ * @param string $param Name of the PHP variable to which the column will be bound.
+ * @param integer $type Data type of the parameter, specified by the Doctrine_Core::PARAM_* constants.
+ * @return boolean Returns TRUE on success or FALSE on failure
+ */
+ public function bindColumn($column, $param, $type = null);
+
+ /**
+ * Binds a value to a corresponding named or question mark
+ * placeholder in the SQL statement that was use to prepare the statement.
+ *
+ * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
+ * this will be a parameter name of the form :name. For a prepared statement
+ * using question mark placeholders, this will be the 1-indexed position of the parameter
+ *
+ * @param mixed $value The value to bind to the parameter.
+ * @param integer $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function bindValue($param, $value, $type = null);
+
+ /**
+ * Binds a PHP variable to a corresponding named or question mark placeholder in the
+ * SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(),
+ * the variable is bound as a reference and will only be evaluated at the time
+ * that Doctrine_Adapter_Statement_Interface->execute() is called.
+ *
+ * Most parameters are input parameters, that is, parameters that are
+ * used in a read-only fashion to build up the query. Some drivers support the invocation
+ * of stored procedures that return data as output parameters, and some also as input/output
+ * parameters that both send in data and are updated to receive it.
+ *
+ * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
+ * this will be a parameter name of the form :name. For a prepared statement
+ * using question mark placeholders, this will be the 1-indexed position of the parameter
+ *
+ * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter.
+ *
+ * @param integer $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return
+ * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the
+ * Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter.
+ *
+ * @param integer $length Length of the data type. To indicate that a parameter is an OUT parameter
+ * from a stored procedure, you must explicitly set the length.
+ * @param mixed $driverOptions
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array());
+
+ /**
+ * Closes the cursor, enabling the statement to be executed again.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function closeCursor();
+
+ /**
+ * Returns the number of columns in the result set
+ *
+ * @return integer Returns the number of columns in the result set represented
+ * by the Doctrine_Adapter_Statement_Interface object. If there is no result set,
+ * this method should return 0.
+ */
+ public function columnCount();
+
+ /**
+ * Fetch the SQLSTATE associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorCode()
+ * @return string error code string
+ */
+ public function errorCode();
+
+ /**
+ * Fetch extended error information associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorInfo()
+ * @return array error info array
+ */
+ public function errorInfo();
+
+ /**
+ * Executes a prepared statement
+ *
+ * If the prepared statement included parameter markers, you must either:
+ * call PDOStatement->bindParam() to bind PHP variables to the parameter markers:
+ * bound variables pass their value as input and receive the output value,
+ * if any, of their associated parameter markers or pass an array of input-only
+ * parameter values
+ *
+ *
+ * @param array $params An array of values with as many elements as there are
+ * bound parameters in the SQL statement being executed.
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function execute($params = null);
+
+ /**
+ * fetch
+ *
+ * @see Doctrine_Core::FETCH_* constants
+ * @param integer $fetchStyle Controls how the next row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
+ * defaulting to Doctrine_Core::FETCH_BOTH
+ *
+ * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor,
+ * this value determines which row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_ORI_* constants, defaulting to
+ * Doctrine_Core::FETCH_ORI_NEXT. To request a scrollable cursor for your
+ * Doctrine_Adapter_Statement_Interface object,
+ * you must set the Doctrine_Core::ATTR_CURSOR attribute to Doctrine_Core::CURSOR_SCROLL when you
+ * prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
+ *
+ * @param integer $cursorOffset For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the
+ * $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_ABS, this value specifies
+ * the absolute number of the row in the result set that shall be fetched.
+ *
+ * For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for
+ * which the $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_REL, this value
+ * specifies the row to fetch relative to the cursor position before
+ * Doctrine_Adapter_Statement_Interface->fetch() was called.
+ *
+ * @return mixed
+ */
+ public function fetch($fetchStyle = Doctrine_Core::FETCH_BOTH,
+ $cursorOrientation = Doctrine_Core::FETCH_ORI_NEXT,
+ $cursorOffset = null);
+
+ /**
+ * Returns an array containing all of the result set rows
+ *
+ * @param integer $fetchStyle Controls how the next row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
+ * defaulting to Doctrine_Core::FETCH_BOTH
+ *
+ * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
+ * Doctrine_Core::FETCH_COLUMN. Defaults to 0.
+ *
+ * @return array
+ */
+ public function fetchAll($fetchStyle = Doctrine_Core::FETCH_BOTH);
+
+ /**
+ * Returns a single column from the next row of a
+ * result set or FALSE if there are no more rows.
+ *
+ * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
+ * value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn()
+ * fetches the first column.
+ *
+ * @return string returns a single column in the next row of a result set.
+ */
+ public function fetchColumn($columnIndex = 0);
+
+ /**
+ * Fetches the next row and returns it as an object.
+ *
+ * Fetches the next row and returns it as an object. This function is an alternative to
+ * Doctrine_Adapter_Statement_Interface->fetch() with Doctrine_Core::FETCH_CLASS or Doctrine_Core::FETCH_OBJ style.
+ *
+ * @param string $className Name of the created class, defaults to stdClass.
+ * @param array $args Elements of this array are passed to the constructor.
+ *
+ * @return mixed an instance of the required class with property names that correspond
+ * to the column names or FALSE in case of an error.
+ */
+ public function fetchObject($className = 'stdClass', $args = array());
+
+ /**
+ * Retrieve a statement attribute
+ *
+ * @param integer $attribute
+ * @see Doctrine_Core::ATTR_* constants
+ * @return mixed the attribute value
+ */
+ public function getAttribute($attribute);
+
+ /**
+ * Returns metadata for a column in a result set
+ *
+ * @param integer $column The 0-indexed column in the result set.
+ *
+ * @return array Associative meta data array with the following structure:
+ *
+ * native_type The PHP native type used to represent the column value.
+ * driver:decl_ type The SQL type used to represent the column value in the database. If the column in the result set is the result of a function, this value is not returned by PDOStatement->getColumnMeta().
+ * flags Any flags set for this column.
+ * name The name of this column as returned by the database.
+ * len The length of this column. Normally -1 for types other than floating point decimals.
+ * precision The numeric precision of this column. Normally 0 for types other than floating point decimals.
+ * pdo_type The type of this column as represented by the PDO::PARAM_* constants.
+ */
+ public function getColumnMeta($column);
+
+ /**
+ * Advances to the next rowset in a multi-rowset statement handle
+ *
+ * Some database servers support stored procedures that return more than one rowset
+ * (also known as a result set). The nextRowset() method enables you to access the second
+ * and subsequent rowsets associated with a PDOStatement object. Each rowset can have a
+ * different set of columns from the preceding rowset.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function nextRowset();
+
+ /**
+ * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
+ * executed by the corresponding object.
+ *
+ * If the last SQL statement executed by the associated Statement object was a SELECT statement,
+ * some databases may return the number of rows returned by that statement. However,
+ * this behaviour is not guaranteed for all databases and should not be
+ * relied on for portable applications.
+ *
+ * @return integer Returns the number of rows.
+ */
+ public function rowCount();
+
+ /**
+ * Set a statement attribute
+ *
+ * @param integer $attribute
+ * @param mixed $value the value of given attribute
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function setAttribute($attribute, $value);
+
+ /**
+ * Set the default fetch mode for this statement
+ *
+ * @param integer $mode The fetch mode must be one of the Doctrine_Core::FETCH_* constants.
+ * @return boolean Returns 1 on success or FALSE on failure.
+ */
+ public function setFetchMode($mode, $arg1 = null, $arg2 = null);
+}
379 library/Doctrine/Adapter/Statement/Mock.php
@@ -0,0 +1,379 @@
+<?php
+/*
+ * $Id: Mock.php 7490 2010-03-29 19:53:27Z jwage $
+ *
+ * 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.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the LGPL. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+/**
+ * Mock connection adapter statement class. Used for special testing purposes
+ *
+ * @package Doctrine
+ * @subpackage Adapter
+ * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 7490 $
+ */
+class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Interface
+{
+ /**
+ * Variable which stores instance of Doctrine_Adapter_Mock
+ *
+ * @var Doctrine_Adapter_Mock
+ */
+ private $_mock;
+
+ /**
+ * queryString
+ *
+ * @var string
+ */
+ public $queryString;
+
+ /**
+ * Constructor for mock adapter statements. Accepts instance of Doctrine_Adapter_Mock
+ *
+ * @param Doctrine_Adapter_Mock $mock
+ */
+ public function __construct($mock)
+ {
+ $this->_mock = $mock;
+ }
+
+ /**
+ * bindColumn
+ *
+ * Bind a column to a PHP variable
+ *
+ * @param mixed $column Number of the column (1-indexed) or name of the column in the result set.
+ * If using the column name, be aware that the name should match
+ * the case of the column, as returned by the driver.
+ * @param string $param Name of the PHP variable to which the column will be bound.
+ * @param integer $type Data type of the parameter, specified by the Doctrine_Core::PARAM_* constants.
+ * @return boolean Returns TRUE on success or FALSE on failure
+ */
+ public function bindColumn($column, $param, $type = null)
+ { }
+
+ /**
+ * bindValue
+ *
+ * Binds a value to a corresponding named or question mark
+ * placeholder in the SQL statement that was use to prepare the statement.
+ *
+ * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
+ * this will be a parameter name of the form :name. For a prepared statement
+ * using question mark placeholders, this will be the 1-indexed position of the parameter
+ *
+ * @param mixed $value The value to bind to the parameter.
+ * @param integer $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function bindValue($param, $value, $type = null)
+ { }
+
+ /**
+ * bindParam
+ *
+ * Binds a PHP variable to a corresponding named or question mark placeholder in the
+ * SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(),
+ * the variable is bound as a reference and will only be evaluated at the time
+ * that Doctrine_Adapter_Statement_Interface->execute() is called.
+ *
+ * Most parameters are input parameters, that is, parameters that are
+ * used in a read-only fashion to build up the query. Some drivers support the invocation
+ * of stored procedures that return data as output parameters, and some also as input/output
+ * parameters that both send in data and are updated to receive it.
+ *
+ * @param mixed $param Parameter identifier. For a prepared statement using named placeholders,
+ * this will be a parameter name of the form :name. For a prepared statement
+ * using question mark placeholders, this will be the 1-indexed position of the parameter
+ *
+ * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter.
+ *
+ * @param integer $type Explicit data type for the parameter using the Doctrine_Core::PARAM_* constants. To return
+ * an INOUT parameter from a stored procedure, use the bitwise OR operator to set the
+ * Doctrine_Core::PARAM_INPUT_OUTPUT bits for the data_type parameter.
+ *
+ * @param integer $length Length of the data type. To indicate that a parameter is an OUT parameter
+ * from a stored procedure, you must explicitly set the length.
+ * @param mixed $driverOptions
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array())
+ {
+
+ }
+
+ /**
+ * closeCursor
+ *
+ * Closes the cursor, enabling the statement to be executed again.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function closeCursor()
+ {
+ return true;
+ }
+
+ /**
+ * columnCount
+ *
+ * Returns the number of columns in the result set
+ *
+ * @return integer Returns the number of columns in the result set represented
+ * by the Doctrine_Adapter_Statement_Interface object. If there is no result set,
+ * this method should return 0.
+ */
+ public function columnCount()
+ {
+ return 0;
+ }
+
+ /**
+ * errorCode
+ *
+ * Fetch the SQLSTATE associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorCode()
+ * @return string error code string
+ */
+ public function errorCode()
+ {
+ return array();
+ }
+
+ /**
+ * errorInfo
+ *
+ * Fetch extended error information associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorInfo()
+ * @return array error info array
+ */
+ public function errorInfo()
+ {
+ return array();
+ }
+
+ /**
+ * fetch
+ *
+ * @see Doctrine_Core::FETCH_* constants
+ * @param integer $fetchStyle Controls how the next row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
+ * defaulting to Doctrine_Core::FETCH_BOTH
+ *
+ * @param integer $cursorOrientation For a PDOStatement object representing a scrollable cursor,
+ * this value determines which row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_ORI_* constants, defaulting to
+ * Doctrine_Core::FETCH_ORI_NEXT. To request a scrollable cursor for your
+ * Doctrine_Adapter_Statement_Interface object,
+ * you must set the Doctrine_Core::ATTR_CURSOR attribute to Doctrine_Core::CURSOR_SCROLL when you
+ * prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
+ *
+ * @param integer $cursorOffset For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the
+ * $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_ABS, this value specifies
+ * the absolute number of the row in the result set that shall be fetched.
+ *
+ * For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for
+ * which the $cursorOrientation parameter is set to Doctrine_Core::FETCH_ORI_REL, this value
+ * specifies the row to fetch relative to the cursor position before
+ * Doctrine_Adapter_Statement_Interface->fetch() was called.
+ *
+ * @return mixed
+ */
+ public function fetch($fetchStyle = Doctrine_Core::FETCH_BOTH,
+ $cursorOrientation = Doctrine_Core::FETCH_ORI_NEXT,
+ $cursorOffset = null)
+ {
+ return array();
+ }
+
+ /**
+ * fetchAll
+ *
+ * Returns an array containing all of the result set rows
+ *
+ * @param integer $fetchStyle Controls how the next row will be returned to the caller.
+ * This value must be one of the Doctrine_Core::FETCH_* constants,
+ * defaulting to Doctrine_Core::FETCH_BOTH
+ *
+ * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
+ * Doctrine_Core::FETCH_COLUMN. Defaults to 0.
+ *
+ * @return array
+ */
+ public function fetchAll($fetchMode = Doctrine_Core::FETCH_BOTH)
+ {
+ return array();
+ }
+
+ /**
+ * execute
+ *
+ * Executes a prepared statement
+ *
+ * If the prepared statement included parameter markers, you must either:
+ * call PDOStatement->bindParam() to bind PHP variables to the parameter markers:
+ * bound variables pass their value as input and receive the output value,
+