public function __construct($singular_name, $pluralize = true) { $this->_db_util = Phactory_DbUtilFactory::getDbUtil(); $this->_singular = $singular_name; if ($pluralize) { $this->_name = Phactory_Inflector::pluralize($singular_name); } else { $this->_name = $singular_name; } }
public function __construct($singular_name, $pluralize = true) { $this->_singular = $singular_name; if ($pluralize) { $this->_name = Phactory_Inflector::pluralize($singular_name); } else { $this->_name = $singular_name; } $this->_collection = Phactory::getDb()->selectCollection($this->_name); }
/** * @dataProvider inflectionExceptionProvider */ public function testAddException($singular, $plural) { $this->assertNotEquals(Phactory_Inflector::pluralize($singular), $plural); Phactory_Inflector::addException($singular, $plural); $this->assertEquals(Phactory_Inflector::pluralize($singular), $plural); }