本文整理匯總了PHP中GO::findClasses方法的典型用法代碼示例。如果您正苦於以下問題:PHP GO::findClasses方法的具體用法?PHP GO::findClasses怎麽用?PHP GO::findClasses使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GO
的用法示例。
在下文中一共展示了GO::findClasses方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _checkCoreModels
private function _checkCoreModels()
{
//fix for invalid acl rows.
$sql = "insert ignore into go_acl (acl_id,group_id) SELECT acl_id,group_id FROM `go_acl` WHERE user_id>0 && group_id>0;";
\GO::getDbConnection()->query($sql);
$sql = "insert ignore into go_acl (acl_id,user_id) SELECT acl_id,user_id FROM `go_acl` WHERE user_id>0 && group_id>0;";
\GO::getDbConnection()->query($sql);
$sql = "delete from go_acl where user_id>0 and group_id>0;";
\GO::getDbConnection()->query($sql);
$classes = \GO::findClasses('model');
foreach ($classes as $model) {
if ($model->isSubclassOf('GO\\Base\\Db\\ActiveRecord') && !$model->isAbstract()) {
echo "Processing " . $model->getName() . "\n";
flush();
$m = \GO::getModel($model->getName());
if ($m->checkDatabaseSupported()) {
$stmt = $m->find(array('ignoreAcl' => true));
$stmt->callOnEach('checkDatabase');
}
}
}
}