本文整理汇总了PHP中app::aliasClasses方法的典型用法代码示例。如果您正苦于以下问题:PHP app::aliasClasses方法的具体用法?PHP app::aliasClasses怎么用?PHP app::aliasClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::aliasClasses方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __wakeup
public function __wakeup()
{
\app::$devices = array('tv' => array('name' => 'tv', 'icon' => 'M 13.415,3.939c-1.214-0.175-2.507-0.301-3.857-0.372L 11.813,1.313l-0.875-0.875L 7.867,3.508 C 7.58,3.503, 7.291,3.5, 7,3.5l0,0L 3.5,0L 2.625,0.875l 2.655,2.655c-1.653,0.058-3.231,0.199-4.695,0.409 C 0.209,5.412,0,7.039,0,8.75s 0.209,3.338, 0.585,4.811C 2.549,13.843, 4.719,14, 7,14 c 2.281,0, 4.451-0.157, 6.415-0.439C 13.791,12.088, 14,10.461, 14,8.75S 13.791,5.412, 13.415,3.939z M 11.811,11.957 C 10.338,12.146, 8.711,12.25, 7,12.25c-1.711,0-3.338-0.104-4.811-0.293C 1.907,10.975, 1.75,9.891, 1.75,8.75 c0-1.141, 0.157-2.226, 0.439-3.207C 3.662,5.354, 5.289,5.25, 7,5.25c 1.711,0, 3.338,0.104, 4.811,0.293 C 12.093,6.524, 12.25,7.609, 12.25,8.75C 12.25,9.891, 12.093,10.975, 11.811,11.957z', 'resolution' => array('1280x768' => '15/9', '1366x768' => '16/9 HD Ready', '1600x900' => '16/9 HD Extended', '1920x1080' => '16/9 Full HD'), 'detectFunc' => function () {
return preg_match('/TV/i', $_SERVER['HTTP_USER_AGENT']);
}), 'tablet' => array('name' => 'tablet', 'icon' => 'M 10.938,0L 2.188,0 C 1.466,0, 0.875,0.591, 0.875,1.313l0,11.375 c0,0.722, 0.591,1.313, 1.313,1.313l 8.75,0 c 0.722,0, 1.313-0.591, 1.313-1.313L 12.25,1.313 C 12.25,0.591, 11.659,0, 10.938,0z M 6.563,13.563 c-0.242,0-0.438-0.196-0.438-0.438s 0.196-0.438, 0.438-0.438s 0.438,0.196, 0.438,0.438S 6.804,13.563, 6.563,13.563z M 10.5,12.25L 2.625,12.25 L 2.625,1.75 l 7.875,0 L 10.5,12.25 z', 'resolution' => array('800x1280' => 'Google Nexus 10 / Samsung Galaxy Tab 2 10.1', '601x921' => 'Google Nexus 7', '600x1024' => 'Samsung Galaxy Tab 2 7.7', '768x1366' => 'Microsoft Surface', '768x1024' => 'Apple iPad'), 'detectFunc' => function () {
return preg_match('/(Tablet|Ipad|Kindle|Silk)|(Android(?!.*(Mobi|Opera Mini)))/i', $_SERVER['HTTP_USER_AGENT']);
/* tablet must be under mobile because "Android" test is good only without "Mobile" in user agent string */
}), 'mobile' => array('name' => 'mobile', 'icon' => 'M 5.25,0.875l 2.625,0 l0,0.875 l-2.625,0 L 5.25,0.875 z M 3.5,2.625l 6.125,0 l0,8.75 L 3.5,11.375 L 3.5,2.625 z M 6.125,12.25l 0.875,0 l0,0.875 l-0.875,0 L 6.125,12.25 z M 3.5,0C 3.063,0, 2.625,0.438, 2.625,0.875l0,12.25 c0,0.438, 0.438,0.875, 0.875,0.875l 6.125,0 c 0.438,0, 0.875-0.438, 0.875-0.875L 10.5,0.875 c0-0.438-0.438-0.875-0.875-0.875L 3.5,0 z', 'resolution' => array('384x640' => 'Nexus 4', '320x568' => 'Apple iPhone 5', '360x640' => 'Samsung Galaxy S3&4 / HTC One', '320x480' => 'Nokia Lumia 900'), 'detectFunc' => function () {
return preg_match('/Mobi|Opera Mini|BlackBerry/i', $_SERVER['HTTP_USER_AGENT']);
}), 'desktop' => array('name' => 'desktop', 'icon' => 'M 7.875,10.5l0,0.875 l 2.625,0 l0,1.75 L 3.5,13.125 l0-1.75 l 2.625,0 l0-0.875 L0,10.5 L0,0.875 l 14,0 l0,9.625 L 7.875,10.5 z M 13.125,1.75L 0.875,1.75 l0,7 l 12.25,0 L 13.125,1.75 z M 1.75,5.223L 1.75,2.625 l 2.625,0 L 1.75,5.223z', 'resolution' => array('max' => 'Normal', '800x600' => '', '1024x768' => '', '1280x800' => '', '1280x1024' => '', '1366x768' => '', '1440x900' => '', '1920x1080' => ''), 'detectFunc' => function () {
return TRUE;
}));
\app::$aliasClasses = array('app' => 'core\\classes\\app', 'request' => 'core\\classes\\request', 'response' => 'core\\classes\\response', 'block' => 'core\\classes\\block', 'tools' => 'core\\classes\\tools', 'view' => 'core\\classes\\view', 'module' => 'core\\classes\\module', 'PDOconnection' => 'core\\classes\\PDOconnection', 'config' => 'core\\classes\\config', 'queryBuilder' => 'core\\classes\\queryBuilder', 'entity' => 'core\\classes\\entity', 'theme' => 'core\\classes\\theme', 'page' => 'core\\classes\\page', 'css' => 'core\\classes\\css', 'user' => 'core\\classes\\user', 'pagination' => 'core\\classes\\pagination', 'img' => 'core\\classes\\img', 'field' => 'core\\classes\\field', 'field_ident' => 'core\\fields\\ident', 'field_string' => 'core\\fields\\string', 'field_numeric' => 'core\\fields\\numeric', 'field_decimal' => 'core\\fields\\decimal', 'field_price' => 'core\\fields\\price', 'field_percent' => 'core\\fields\\percent', 'field_mail' => 'core\\fields\\mail', 'field_password' => 'core\\fields\\password', 'field_state' => 'core\\fields\\state', 'field_date' => 'core\\fields\\date', 'field_publication' => 'core\\fields\\publication', 'field_image' => 'core\\fields\\image', 'field_url' => 'core\\fields\\url', 'field_url_rewriting' => 'core\\fields\\url_rewriting', 'field_wysiwyg' => 'core\\fields\\wysiwyg', 'field_textarea' => 'core\\fields\\textarea', 'field_user' => 'core\\fields\\user', 'field_ip' => 'core\\fields\\ip', 'field_boolean' => 'core\\fields\\boolean', 'field_file' => 'core\\fields\\file', 'field_foreignkey' => 'core\\fields\\foreignkey', 'field_formasso' => 'core\\fields\\formasso', 'field_alias' => 'core\\fields\\alias');
/* on page load */
\app::addListener('beforePageLoad', array($this, 'loadExternalFiles'));
}
示例2: define
</div>
<div><br>
</div>
<input type="hidden" name="step" value="validstep4" />
<?php
break 2;
case 5:
include 'modules/core/classes/app.php';
class_alias('core\\classes\\app', 'app');
include 'profiles/www/config.php';
define('PREFIX', $config['db']['prefix']);
app::$config = $config;
app::$activeModules = array_filter($config['modules']);
$config['aliasClasses'] = array('app' => 'core\\classes\\app', 'request' => 'core\\classes\\request', 'response' => 'core\\classes\\response', 'block' => 'core\\classes\\block', 'tools' => 'core\\classes\\tools', 'view' => 'core\\classes\\view', 'module' => 'core\\classes\\module', 'PDOconnection' => 'core\\classes\\PDOconnection', 'config' => 'core\\classes\\config', 'queryBuilder' => 'core\\classes\\queryBuilder', 'entity' => 'core\\classes\\entity', 'theme' => 'core\\classes\\theme', 'page' => 'core\\classes\\page', 'css' => 'core\\classes\\css', 'user' => 'core\\classes\\user', 'pagination' => 'core\\classes\\pagination', 'img' => 'core\\classes\\img', 'field' => 'core\\classes\\field', 'field_ident' => 'core\\fields\\ident', 'field_string' => 'core\\fields\\string', 'field_numeric' => 'core\\fields\\numeric', 'field_decimal' => 'core\\fields\\decimal', 'field_price' => 'core\\fields\\price', 'field_percent' => 'core\\fields\\percent', 'field_mail' => 'core\\fields\\mail', 'field_password' => 'core\\fields\\password', 'field_state' => 'core\\fields\\state', 'field_date' => 'core\\fields\\date', 'field_publication' => 'core\\fields\\publication', 'field_image' => 'core\\fields\\image', 'field_url' => 'core\\fields\\url', 'field_url_rewriting' => 'core\\fields\\url_rewriting', 'field_wysiwyg' => 'core\\fields\\wysiwyg', 'field_textarea' => 'core\\fields\\textarea', 'field_user' => 'core\\fields\\user', 'field_ip' => 'core\\fields\\ip', 'field_boolean' => 'core\\fields\\boolean', 'field_foreignkey' => 'core\\fields\\foreignkey', 'field_formasso' => 'core\\fields\\formasso');
app::$aliasClasses = $config['aliasClasses'];
define('PROFILE_PATH', 'profiles/www/modules/');
$toInclude = array('config', 'queryBuilder', 'entity', 'field', 'field_ident', 'field_string', 'field_numeric', 'field_decimal', 'field_price', 'field_percent', 'field_mail', 'field_password', 'field_state', 'field_date', 'field_publication', 'field_image', 'field_flash', 'field_url', 'field_url_rewriting', 'field_wysiwyg', 'field_textarea', 'field_user', 'field_ip', 'field_boolean', 'field_foreignkey', 'field_formasso', 'PDOconnection', 'tools', 'module');
foreach ($config['aliasClasses'] as $alias => $class) {
if (in_array($alias, $toInclude)) {
include 'modules/' . str_replace('\\', '/', $class) . '.php';
class_alias($class, $alias);
}
}
//create SQL tables
include 'modules/core/module.php';
$core = new \core\module('core');
$core->install();
include 'modules/blog/module.php';
$blog = new \blog\module('blog');
$blog->install();