Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

Commit

Permalink
Added Doctrine2
Browse files Browse the repository at this point in the history
  • Loading branch information
koen Huybrechts committed Mar 6, 2011
1 parent 25b45f3 commit a494379
Show file tree
Hide file tree
Showing 1,500 changed files with 212,767 additions and 43 deletions.
5 changes: 5 additions & 0 deletions .gitignore
@@ -1 +1,6 @@
tests/build/**

.idea
.settings
.project
.buildpath
88 changes: 88 additions & 0 deletions .zfproject.xml
@@ -0,0 +1,88 @@
<?xml version="1.0"?>
<projectProfile>
<projectDirectory>
<projectProfileFile/>
<applicationDirectory>
<apisDirectory enabled="false"/>
<configsDirectory>
<applicationConfigFile type="ini"/>
</configsDirectory>
<controllersDirectory>
<controllerFile controllerName="index">
<actionMethod actionName="index"/>
</controllerFile>
<controllerFile controllerName="error"/>
</controllersDirectory>
<layoutsDirectory enabled="false"/>
<modelsDirectory/>
<modulesDirectory enabled="false">
<moduleDirectory moduleName="news">
<apisDirectory enabled="false"/>
<configsDirectory enabled="false"/>
<controllersDirectory/>
<layoutsDirectory enabled="false"/>
<modelsDirectory/>
<viewsDirectory>
<viewScriptsDirectory/>
<viewHelpersDirectory/>
<viewFiltersDirectory/>
</viewsDirectory>
</moduleDirectory>
<moduleDirectory moduleName="pages">
<apisDirectory enabled="false"/>
<configsDirectory enabled="false"/>
<controllersDirectory/>
<layoutsDirectory enabled="false"/>
<modelsDirectory/>
<viewsDirectory>
<viewScriptsDirectory/>
<viewHelpersDirectory/>
<viewFiltersDirectory/>
</viewsDirectory>
</moduleDirectory>
</modulesDirectory>
<viewsDirectory>
<viewScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="index">
<viewScriptFile forActionName="index"/>
</viewControllerScriptsDirectory>
<viewControllerScriptsDirectory forControllerName="error">
<viewScriptFile forActionName="error"/>
</viewControllerScriptsDirectory>
</viewScriptsDirectory>
<viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/>
</viewsDirectory>
<bootstrapFile/>
</applicationDirectory>
<dataDirectory enabled="false">
<cacheDirectory enabled="false"/>
<searchIndexesDirectory enabled="false"/>
<localesDirectory enabled="false"/>
<logsDirectory enabled="false"/>
<sessionsDirectory enabled="false"/>
<uploadsDirectory enabled="false"/>
</dataDirectory>
<libraryDirectory>
<zfStandardLibraryDirectory enabled="false"/>
</libraryDirectory>
<publicDirectory>
<publicStylesheetsDirectory enabled="false"/>
<publicScriptsDirectory enabled="false"/>
<publicImagesDirectory enabled="false"/>
<publicIndexFile/>
<htaccessFile/>
</publicDirectory>
<projectProvidersDirectory enabled="false"/>
<temporaryDirectory enabled="false"/>
<testsDirectory>
<testPHPUnitConfigFile/>
<testApplicationDirectory>
<testApplicationBootstrapFile/>
</testApplicationDirectory>
<testLibraryDirectory>
<testLibraryBootstrapFile/>
</testLibraryDirectory>
</testsDirectory>
</projectDirectory>
</projectProfile>
4 changes: 2 additions & 2 deletions README
Expand Up @@ -14,7 +14,7 @@ FEATURES include
- Best practice php tools
- phploc
- phpcpd
- phpdcd
- phpdcd (coming soon)
- pdepend (coming soon)
- phpmd (coming soon)
- phpcs (coming soon)
Expand All @@ -28,7 +28,7 @@ TECHNOLOGIES USED
- Zend Framework 1.11+
- Doctrine 2+
- PHPUnit 3.5+
- PHP Documentor (coming soon)
- PHP Documentor


--------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions application/modules/default/models/userModel.php
@@ -0,0 +1,9 @@
<?php

class Default_Model_User
{
public function getEntries()
{

}
}
58 changes: 58 additions & 0 deletions application/modules/default/tests/models/userModelTest.php
@@ -0,0 +1,58 @@
<?php

require('../application/modules/default/models/userModel.php');
/**
* Created by JetBrains PhpStorm.
* User: koko
* Date: 1/03/11
* Time: 20:23
* To change this template use File | Settings | File Templates.
*/

class userModelTest extends BaseTestCase
{
/**
* Config object
*
* @author Eddie Jaoude
* @param object $config
*
*/
protected $config;

/**
* Initialisation of config object
*
* @author Eddie Jaoude
* @param null
* @return null
*
*/
public function setup()
{
parent::setUp();
$this->config = new Zend_Config_Ini(APP_PATH . '/configs/application.ini', 'testing');
}

public function testFunctionInitExist()
{
$userModel = new Default_Model_User();
$this->assertEquals(true, is_object($userModel));
}

/**
* Finaliase (post-tests)
*
* Deletes class variable $this->consignment
*
* @author Eddie Jaoude
* @param null
* @return null
*
*/
public function tearDown()
{
parent::tearDown();
unset($this->config);
}
}
81 changes: 81 additions & 0 deletions library/Doctrine/Common/Annotations/Annotation.php
@@ -0,0 +1,81 @@
<?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>.
*/

namespace Doctrine\Common\Annotations;

/**
* Annotations class
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class Annotation
{
/**
* Value property. Common among all derived classes.
*
* @var string
*/
public $value;

/**
* Constructor
*
* @param array $data Key-value for properties to be defined in this class
*/
public final function __construct(array $data)
{
foreach ($data as $key => $value) {
$this->$key = $value;
}
}

/**
* Error handler for unknown property accessor in Annotation class.
*
* @param string $name Unknown property name
*/
public function __get($name)
{
throw new \BadMethodCallException(
sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this))
);
}

/**
* Error handler for unknown property mutator in Annotation class.
*
* @param string $name Unkown property name
* @param mixed $value Property value
*/
public function __set($name, $value)
{
throw new \BadMethodCallException(
sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this))
);
}
}
54 changes: 54 additions & 0 deletions library/Doctrine/Common/Annotations/AnnotationException.php
@@ -0,0 +1,54 @@
<?php
/*
* 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>.
*/

namespace Doctrine\Common\Annotations;

/**
* Description of AnnotationException
*
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class AnnotationException extends \Exception
{
/**
* Creates a new AnnotationException describing a Syntax error.
*
* @param string $message Exception message
* @return AnnotationException
*/
public static function syntaxError($message)
{
return new self('[Syntax Error] ' . $message);
}

/**
* Creates a new AnnotationException describing a Semantical error.
*
* @param string $message Exception message
* @return AnnotationException
*/
public static function semanticalError($message)
{
return new self('[Semantical Error] ' . $message);
}
}

0 comments on commit a494379

Please sign in to comment.