1
0
mirror of synced 2024-12-13 14:56:01 +03:00

added license to Doctrine_Null, removed Doctrine_Module (depracated component)

This commit is contained in:
zYne 2006-09-20 21:46:26 +00:00
parent 17f0c82ba9
commit 521ad6d9a8
2 changed files with 23 additions and 60 deletions

View File

@ -1,60 +0,0 @@
<?php
class Doctrine_Module implements IteratorAggregate, Countable {
/**
* @var array $components an array containing all the components in this module
*/
protected $components = array();
/**
* @var string $name the name of this module
*/
private $name;
/**
* constructor
*
* @param string $name the name of this module
*/
public function __construct($name) {
$this->name = $name;
}
/**
* returns the name of this module
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* flush
* saves all components
*
* @return void
*/
public function flush() {
$connection = Doctrine_Manager::getInstance()->getCurrentConnection();
$tree = $connection->buildFlushTree($this->components);
}
/**
* getIterator
* this class implements IteratorAggregate interface
* returns an iterator that iterates through the components
* in this module
*
* @return ArrayIterator
*/
public function getIterator() {
return new ArrayIterator($this->components);
}
/**
* count
* this class implements Countable interface
* returns the number of components in this module
*
* @return integer
*/
public function count() {
return count($this->components);
}
}

View File

@ -1,9 +1,32 @@
<?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.phpdoctrine.com>.
*/
/**
* Doctrine_Null
*
* Simple empty class representing a null value
* used for extra fast null value testing with isset() rather than array_key_exists()
*
* @package Doctrine ORM
* @url www.phpdoctrine.com
* @license LGPL
*/
class Doctrine_Null { }