当前位置: 首页>>代码示例>>PHP>>正文


PHP Manager::import方法代码示例

本文整理汇总了PHP中Manager::import方法的典型用法代码示例。如果您正苦于以下问题:PHP Manager::import方法的具体用法?PHP Manager::import怎么用?PHP Manager::import使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


在下文中一共展示了Manager::import方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

<?php

Manager::import("exemplos\\models\\*");
class AlunoController extends MController
{
    public function main()
    {
        $this->render("formBase");
    }
    public function formFind()
    {
        $model = new Aluno($this->data->id);
        $this->data->object = $model->getData();
        $this->data->query = $model->listByFilter($this->data->filter)->asQuery();
        $this->render();
    }
    public function formNew()
    {
        $this->data->action = '@exemplos/aluno/save';
        $this->render();
    }
    public function formNewLookup()
    {
        $this->data->action = '@exemplos/aluno/save';
        $this->render();
    }
    public function formObject()
    {
        $this->data->object = Aluno::create($this->data->id)->getData();
        $this->render();
    }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:31,代码来源:alunoController.php

示例2: init

<?php

use Maestro\MVC\MApp;
Manager::import("fnbr20\\models\\*");
class FrameController extends MController
{
    private $idLanguage;
    public function init()
    {
        Manager::checkLogin(false);
        $this->idLanguage = Manager::getConf('fnbr20.lang');
        $msgDir = Manager::getAppPath('conf/report');
        Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
        Manager::$msg->addMessages($msgDir);
    }
    public function main()
    {
        $this->data->isMaster = Manager::checkAccess('MASTER', A_EXECUTE) ? 'true' : 'false';
        $editor = MApp::getService('fnbr20', '', 'visualeditor');
        $this->data->relationData = $editor->getRelationData();
        $this->data->relationEntry = json_encode($this->data->relationData);
        $this->render();
    }
    public function frameTree()
    {
        $grapher = MApp::getService('fnbr20', '', 'grapher');
        if ($this->data->id == '') {
            $children = $grapher->listFrames($this->data, $this->idLanguage);
            $data = (object) ['id' => 'root', 'state' => 'open', 'text' => 'Frames', 'children' => $children];
            $json = json_encode([$data]);
        }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:31,代码来源:_FrameController.php

示例3: main

<?php

Manager::import('exemplos\\models\\*');
class PessoaController extends MController
{
    public function main()
    {
        $this->render("formBase");
    }
    public function formFind()
    {
        $model = new Pessoa($this->data->id);
        $this->data->object = $model->getData();
        $filter->nome = $this->data->nome . '%';
        $this->data->query = $model->listByFilter($filter)->asQuery();
        mdump($this->data->query->getResult());
        mdump($this->data->query->getColumnNames());
        $this->render();
    }
    public function formNew()
    {
        // Exemplo de uso de "options" para MSelection
        $this->data->options = array('RJ' => 'Rio de Janeiro', 'MG' => 'Minas Gerais', 'SP' => 'São Paulo', 'ES' => 'Espírito Santo', 'BA' => 'Bahia', 'RS' => 'Rio Grande do Sul');
        $this->data->action = "@exemplos/pessoa/save";
        $this->render();
    }
    public function formObject()
    {
        $model = new Pessoa($this->data->id);
        $this->data->object = $model->getData();
        $this->render();
开发者ID:joshuacoddingyou,项目名称:php,代码行数:31,代码来源:pessoaController.php

示例4: init

<?php

/**
 * $_comment
 *
 * @category   Maestro
 * @package    UFJF
 * @subpackage $_package
 * @copyright  Copyright (c) 2003-2012 UFJF (http://www.ufjf.br)
 * @license    http://siga.ufjf.br/license
 * @version    
 * @since      
 */
Manager::import("auth\\models\\*");
class MessageController extends MController
{
    private $idLanguage;
    public function init()
    {
        parent::init();
        $this->idLanguage = Manager::getConf('options.language');
        $msgDir = Manager::getAppPath('conf/report');
        Manager::$msg->file = 'messages.' . $this->idLanguage . '.php';
        Manager::$msg->addMessages($msgDir);
    }
    public function main()
    {
        $this->render("formBase");
    }
    public function formMail()
    {
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:31,代码来源:MessageController.php

示例5: main

<?php

/**
 * $_comment
 *
 * @category   Maestro
 * @package    UFJF
 * @subpackage $_package
 * @copyright  Copyright (c) 2003-2012 UFJF (http://www.ufjf.br)
 * @license    http://siga.ufjf.br/license
 * @version    
 * @since      
 */
use auth\models;
Manager::import('auth\\models\\*');
class GrupoController extends MController
{
    public function main()
    {
        $this->render("formBase");
    }
    public function formFind()
    {
        $model = new models\Grupo($this->data->id);
        $this->data->object = $model->getData();
        $filter->grupo = $this->data->grupo;
        $this->data->query = $model->listByFilter($filter)->asQuery();
        $this->render();
    }
    public function formNew()
    {
开发者ID:joshuacoddingyou,项目名称:php,代码行数:31,代码来源:grupoController.php

示例6: init

/* Copyright [2011, 2012, 2013] da Universidade Federal de Juiz de Fora
 * Este arquivo é parte do programa Framework Maestro.
 * O Framework Maestro é um software livre; você pode redistribuí-lo e/ou 
 * modificá-lo dentro dos termos da Licença Pública Geral GNU como publicada 
 * pela Fundação do Software Livre (FSF); na versão 2 da Licença.
 * Este programa é distribuído na esperança que possa ser  útil, 
 * mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer
 * MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/GPL 
 * em português para maiores detalhes.
 * Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
 * "LICENCA.txt", junto com este programa, se não, acesse o Portal do Software
 * Público Brasileiro no endereço www.softwarepublico.gov.br ou escreva para a 
 * Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 */
Manager::import('core::classes::extensions::geshi::geshi', 'GeSHi');
class MSyntax extends MOutputControl
{
    public function init($name = NULL, $text = NULL, $language = 'php', $line = '')
    {
        parent::init($name);
        $this->setText($text);
        $this->setLanguage($language);
        $this->setLine($line);
    }
    public function setLanguage($value)
    {
        $this->property->language = $value;
    }
    public function getLanguage()
    {
开发者ID:joshuacoddingyou,项目名称:php,代码行数:31,代码来源:msyntax.php

示例7: formVersion

<?php

use Zend\Math\Rand;
use Zend\Math\BigInteger\BigInteger;
use Zend\Captcha\Image;
use Zend\Soap\AutoDiscover;
use Zend\Soap\Server;
use Zend\Soap\Client;
use Zend\Session;
Manager::import('apps::exemplos::services::soapService');
class ZendController extends MController
{
    public function formVersion()
    {
        $this->data->versao = "Zend Version = " . Zend\Version\Version::getLatest();
        $this->render();
    }
    public function formRand()
    {
        $bytes = Rand::getBytes(32, true);
        $this->data->bytes = "Random bytes (in Base64): " . base64_encode($bytes);
        $boolean = Rand::getBoolean();
        $this->data->boolean = "Random boolean: " . ($boolean ? 'true' : 'false');
        $integer = Rand::getInteger(0, 1000);
        $this->data->integer = "Random integer in [0-1000]: " . $integer;
        $float = Rand::getFloat();
        $this->data->float = "Random float in [0-1): " . $float;
        $string = Rand::getString(32, 'abcdefghijklmnopqrstuvwxyz', true);
        $this->data->string = "Random string in latin alphabet:" . $string;
        $this->render();
    }
开发者ID:joshuacoddingyou,项目名称:php,代码行数:31,代码来源:zendController.php


注:本文中的Manager::import方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。