diff --git a/bootstrap.php b/bootstrap.php index 942d4c1..22d29c5 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -6,6 +6,7 @@ */ $_ENV['dir.bootstrap'] = str_replace('\\','/',realpath(dirname(__FILE__))) . '/'; $_ENV['url.base'] = str_replace('bootstrap.php', '', $_SERVER['PHP_SELF']); +if(strpos($_SERVER['REQUEST_URI'],'/bootstrap.php')===0) exit; $bootstrapped = true; require_once('./recess-conf.php'); diff --git a/recess/lib/recess/database/orm/ModelDataSource.class.php b/recess/lib/recess/database/orm/ModelDataSource.class.php index 8ac136f..07c9c68 100644 --- a/recess/lib/recess/database/orm/ModelDataSource.class.php +++ b/recess/lib/recess/database/orm/ModelDataSource.class.php @@ -38,7 +38,7 @@ function modelToTableDescriptor(ModelDescriptor $descriptor) { return $tableDescriptor; } - function createTableSql(ModelDescriptor $descriptor) { + function createTableSql($descriptor) { return parent::createTableSql($this->modelToTableDescriptor($descriptor)); } diff --git a/recess/lib/recess/database/pdo/PdoDataSource.class.php b/recess/lib/recess/database/pdo/PdoDataSource.class.php index 115e2d5..9e19b36 100644 --- a/recess/lib/recess/database/pdo/PdoDataSource.class.php +++ b/recess/lib/recess/database/pdo/PdoDataSource.class.php @@ -226,7 +226,7 @@ function emptyTable($table) { return $this->provider->emptyTable($table); } - function createTableSql(RecessTableDescriptor $tableDescriptor) { + function createTableSql($tableDescriptor) { return $this->provider->createTableSql($tableDescriptor); } } diff --git a/recess/lib/recess/lang/RecessReflectionClass.class.php b/recess/lib/recess/lang/RecessReflectionClass.class.php index f821d89..6e10cd6 100644 --- a/recess/lib/recess/lang/RecessReflectionClass.class.php +++ b/recess/lib/recess/lang/RecessReflectionClass.class.php @@ -22,9 +22,9 @@ * @link http://www.recessframework.org/ */ class RecessReflectionClass extends ReflectionClass { - function getProperties() { + function getProperties($filter = '') { Library::import('recess.lang.RecessReflectionProperty'); - $rawProperties = parent::getProperties(); + $rawProperties = parent::getProperties($filter); $properties = array(); foreach($rawProperties as $rawProperty) { $properties[] = new RecessReflectionProperty($this->name, $rawProperty->name);