本文整理汇总了PHP中mdump函数的典型用法代码示例。如果您正苦于以下问题:PHP mdump函数的具体用法?PHP mdump怎么用?PHP mdump使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mdump函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: formPreferences
public function formPreferences()
{
$user = new User($this->data->id);
$this->data->title = $user->getLogin() . ' :: Preferences';
$this->data->save = "@fnbr20/auth/user/savePreferences|formPreferences";
$userLevel = $user->getUserLevel();
if ($userLevel == 'BEGINNER') {
$this->data->isBeginner = true;
$this->data->idJunior = $user->getConfigData('fnbr20JuniorUser');
$this->data->junior = $user->getUsersOfLevel('JUNIOR');
mdump($this->data);
}
if ($userLevel == 'JUNIOR') {
$this->data->isJunior = true;
$this->data->idSenior = $user->getConfigData('fnbr20SeniorUser');
$this->data->senior = $user->getUsersOfLevel('SENIOR');
mdump($this->data);
}
if ($userLevel == 'SENIOR') {
$this->data->isSenior = true;
$this->data->idMaster = $user->getConfigData('fnbr20MasterUser');
$this->data->master = $user->getUsersOfLevel('MASTER');
mdump($this->data);
}
$this->data->userLevel = $userLevel;
$this->render();
}
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:27,代码来源:UserController.php
示例2: currency
public function currency()
{
$value = 123456.78;
$this->data->value = 'Valor = ' . $value;
$currency = Manager::currency($value);
$this->data->currency = 'Currency = ' . $currency;
$formated = $currency->format();
$this->data->formated = 'Formatado = ' . $formated;
$currency = Manager::currency($formated);
$value = $currency->getValue();
$this->data->getValue = 'Get Value = ' . $value;
$currency->setValue(87654321.09);
$this->data->setValue = 'Após setValue = ' . $currency;
$currency->setValue(-654.3200000000001);
$this->data->setValueNeg = 'Após setValue negativo = ' . $currency;
$currency = Manager::currency('-R$ 123.345,67');
$value = $currency->getValue();
$this->data->valueNeg = 'Valor negativo = ' . $value;
$valor1 = Manager::currency(10.9008900015);
$valor2 = Manager::currency(10.9008900017);
mdump($valor1->getValue() == $valor2->getValue() ? 'Valores iguais' : 'Valores diferentes');
$valor1 = Manager::currency(10.9018900015);
$valor2 = Manager::currency(10.9068900017);
mdump($valor1->getValue() == $valor2->getValue() ? 'Valores iguais' : 'Valores diferentes');
$this->render();
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:26,代码来源:typesController.php
示例3: generateFields
public function generateFields()
{
$fields = '';
$control = $this->fields;
if ($control->hasItems()) {
foreach ($control->controls as $field) {
mdump($field);
if ($field->tag == 'mhiddenfield') {
$fields .= $field->generate();
} else {
$mfieldlabel = new mfieldlabel(['id' => $field->property->id, 'text' => $field->property->label]);
if ($this->property->layout == 'horizontal') {
//$mfieldlabel->setClass($this->labelClass);
}
$label = $mfieldlabel->generate();
if ($label) {
$formGroup = "<div class=\"mFormColumn\">{$label}</div>" . "<div class=\"mFormColumn\">{$field->generate()}</div>";
} else {
//$formGroup = "<div class=\"mFormColumn\">{$field->generate()}</div>";
$formGroup = "<div class=\"mFormColumn\"></div>" . "<div class=\"mFormColumn\">{$field->generate()}</div>";
}
if ($field->tag == 'mvcontainer' || $field->tag == 'mhcontainer') {
$fields .= "</div>";
$fields .= $field->generate();
$fields .= "<div class='mFormContainer'>";
} else {
// usa a classe form-group do bootstrap
$fields .= "<div class=\"mFormRow\">{$formGroup}</div>";
}
}
}
}
return $fields;
}
开发者ID:elymatos,项目名称:expressive,代码行数:34,代码来源:MForm.php
示例4: generateForm
public function generateForm()
{
$this->property->action = $this->property->action ?: Manager::getCurrentURL();
\Maestro\Utils\MUtil::setIfNull($this->property->method, 'POST');
\Maestro\Utils\MUtil::setIfNull($this->style->width, "100%");
$this->property->role = "form";
$fields = $buttons = $help = $tools = "";
$fields = $this->generateFields();
$buttons = $this->generateButtons();
$help = $this->generateHelp();
if ($this->tools != NULL) {
mdump('has tools');
$tools = $this->generateTools();
}
// menubar
if ($this->property->menubar) {
$menubar = PainterControl::generate($this->property->menubar);
}
// por default, o método de submissão é POST
\Maestro\Utils\MUtil::setIfNull($this->property->method, "POST");
if ($this->property->onsubmit) {
PainterControl::getPage()->onSubmit($this->property->onsubmit, $this->property->id);
}
// se o form tem fields com validators, define onSubmit
$validators = '';
if (count($this->property->toValidate)) {
PainterControl::getPage()->onSubmit("\$('#{$this->property->id}').form('validate')", $this->property->id);
$validators = implode(',', $this->property->bsValidator);
}
//mdump($fields);
// obtem o codigo html via template
$inner = PainterControl::fetch('painter/formdialog', $this, ['fields' => $fields, 'buttons' => $buttons, 'help' => $help, 'tools' => $tools, 'validators' => $validators, 'menubar' => $menubar]);
return $inner;
}
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:34,代码来源:FormDialog.php
示例5: formNewWindowPost
public function formNewWindowPost()
{
$pessoa = new models\Pessoa($this->data->idPessoa);
$pessoa->setData($this->data);
$pessoa->save();
$this->data->object = $pessoa->getData();
mdump($this->data->object);
$this->render();
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:9,代码来源:eventdrivenController.php
示例6: main
public function main()
{
$this->data->isMaster = Manager::checkAccess('MASTER', A_EXECUTE) ? 'true' : 'false';
$editor = MApp::getService('fnbr20', '', 'visualeditor');
$this->data->relationData = $editor->getAllCxnRelationData();
mdump($this->data->relationData);
$this->data->relationEntry = json_encode($this->data->relationData);
$this->render();
}
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:9,代码来源:_CxnController.php
示例7: listForLookup
public function listForLookup()
{
//$colorRepository = new InMemoryColorRepository();
//$service = new QueryService($colorRepository);
$queryService = Manager::getContainer()->get('ColorQueryService');
$filter = (object) ['idColor' => 2];
$list = $queryService->listForLookup();
mdump($list);
$this->render('formLogin');
}
开发者ID:elymatos,项目名称:expressive,代码行数:10,代码来源:ColorController.php
示例8: formFind
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();
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:10,代码来源:pessoaController.php
示例9: authenticate
public function authenticate()
{
$auth = Manager::getAuth();
$this->data->result = $auth->authenticate($this->data->user, $this->data->challenge, $this->data->response);
if ($this->data->result) {
mdump("++++++++++++");
$this->redirect(Manager::getURL('dlivro/main'));
} else {
$this->renderPrompt('error', 'Login ou senha inválidos. Tente novamente.');
}
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:11,代码来源:mainController.php
示例10: __construct
function __construct()
{
$data = Manager::getData();
$array = json_decode($data->gridInputExemplo3_data);
mdump($array);
parent::__construct('gridInputExemploGrid3', $array, null, '', 0, 1);
$this->addActionSelect('marca3');
$this->addColumn(new MObjectGridColumn('id', '', 'left', true, '0%', false));
$this->addColumn(new MObjectGridColumn('codigoExemplo3', 'Código', 'left', true, '20%', true));
$this->addColumn(new MObjectGridColumn('descricaoExemplo3', 'Descrição', 'left', true, '80%', true));
$this->setHasForm('true');
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:12,代码来源:gridInputExemplo3.php
示例11: __construct
public function __construct($id, $basePath)
{
$this->id = $id;
$this->basePath = $basePath;
mdump('basepath = ' . $basePath);
mtracestack();
//$this->loadModules();
$this->loadControllers();
$this->loadServices();
$this->loadComponents();
$this->loadFilters();
$this->loadModels();
//$this->loadMaps();
}
开发者ID:elymatos,项目名称:expressive,代码行数:14,代码来源:MAppStructure.php
示例12: __invoke
public function __invoke(ContainerInterface $container, RequestedEntry $entry)
{
$repository = $container->get('repository');
$model = str_replace('Repository', '', $entry->getName());
if ($repository == 'Doctrine') {
$em = $container->get('EntityManager');
//return new \FNBr\Infrastructure\Persistence\Doctrine\Color\DoctrineColorRepository($em);
mdump("\\FNBr\\Domain\\Model\\{$model}\\{$model}");
return $em->getRepository("\\FNBr\\Domain\\Model\\{$model}\\{$model}");
} else {
//InMemory
return new \FNBr\Infrastructure\Persistence\InMemory\Color\InMemoryColorRepository();
}
}
开发者ID:elymatos,项目名称:expressive,代码行数:14,代码来源:RepositoryFactory.php
示例13: listByFilter
public function listByFilter($filter)
{
mdump($filter);
$criteria = $this::getCriteria()->select('idPessoa, nome, cpf, dataNascimento, email');
if ($filter->nome) {
$criteria->where("nome LIKE '%{$filter->nome}%'");
}
if ($filter->cpf) {
$criteria->where("cpf = '{$filter->cpf}'");
}
if ($filter->email) {
$criteria->where("email LIKE '{$filter->email}%'");
}
return $criteria;
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:15,代码来源:pessoa.php
示例14: setContent
public function setContent()
{
mdump('Executing MRuntimeError');
try {
$errorHtml = $this->fetch("runtime");
if (Manager::isAjaxCall()) {
$this->ajax->setType('page');
$this->ajax->setData($errorHtml);
$this->ajax->setResponseType('JSON');
$this->content = $this->ajax->returnData();
} else {
$this->content = $errorHtml;
}
} catch (\Maestro\Services\Exception\EMException $e) {
}
}
开发者ID:elymatos,项目名称:expressive,代码行数:16,代码来源:MRuntimeError.php
示例15: getMetaData
public function getMetaData($stmt)
{
$s = $stmt->getWrappedStatement();
mdump('xxx');
mdump($s->getColumnMeta(0));
$metadata['columnCount'] = $count = $s->columnCount();
mdump($count);
for ($i = 0; $i < $count; $i++) {
$meta = $s->getColumnMeta($i);
$name = strtoupper($meta['name']);
$metadata['fieldname'][$i] = $name;
$metadata['fieldtype'][$name] = $this->_getMetaType($meta['pdo_type']);
$metadata['fieldlength'][$name] = $meta['len'];
$metadata['fieldpos'][$name] = $i;
}
return $metadata;
}
开发者ID:elymatos,项目名称:expressive,代码行数:17,代码来源:Platform.php
示例16: validate
/**
*
* @param int $userId
* @param string $challenge
* @param string $response
* @return boolean
*/
public function validate($userId, $challenge, $response)
{
$user = Manager::getModelMAD('user');
$user->getByLogin($userId);
$login = $user->getLoginAtivo();
mdump("Ldap validating userid = {$userId} - login ativo = {$login}");
$filter = "uid={$login}";
mdump("Ldap filter = {$filter}");
$mldap = new \MLdap();
$info = $mldap->search($filter, array('userPassword'));
mdump($info);
if ($info['count'] == 0) {
return false;
}
$passLdap = trim($info[0]['userpassword'][0]);
$hash_pass = md5(trim($login) . ':' . MLdap::ldapToMd5($passLdap) . ":" . $challenge);
return $hash_pass == $response;
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:25,代码来源:mauthldapmd5.php
示例17: show
public function show()
{
$file = Manager::getAppPath('public/files/controles.txt');
$this->data->ini = parse_ini_file($file, true);
$this->data->class = $this->data->lookupControl;
$this->data->description = $this->data->ini[$this->data->class]['description'];
$this->data->extends = $this->data->ini[$this->data->class]['extends'];
$this->data->attributes = array();
$attributes = $this->data->ini[$this->data->class]['attributes'];
if (is_array($attributes)) {
foreach ($attributes as $name => $description) {
$this->data->attributes[$name]['name'] = $name;
$this->data->attributes[$name]['class'] = $this->data->class;
$this->data->attributes[$name]['description'] = $description;
}
}
$header = $this->data->ini[$this->data->class];
$extends = $header['extends'];
while ($extends) {
$parent = $this->data->ini[$extends];
$attributes = $parent['attributes'];
if (is_array($attributes)) {
foreach ($attributes as $name => $description) {
$this->data->attributes[$name]['name'] = $name;
$this->data->attributes[$name]['class'] = $extends;
$this->data->attributes[$name]['description'] = $description;
}
}
$extends = $parent['extends'];
}
ksort($this->data->attributes);
$codeXML = Manager::getAppPath('public/files/code/' . strtolower($this->data->class) . '.xml');
$this->data->code = highlight_file($codeXML, true);
//htmlentities(file_get_contents($codeXML));
mdump($codeXML);
mdump($this->data->code);
$this->render();
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:38,代码来源:mainController.php
示例18: loadFile
public function loadFile($xmlFile, $context = NULL)
{
libxml_use_internal_errors(true);
// $this->root = simplexml_load_file($xmlFile, "SimpleXMLElement", LIBXML_NOCDATA);
$this->path = pathinfo($xmlFile, PATHINFO_DIRNAME);
//mdump('xml file = ' . $xmlFile);
$xmlString = file_get_contents($xmlFile);
$xmlString = utf8_encode($xmlString);
// mdump($xmlString);
$this->root = simplexml_load_string($xmlString, NULL, LIBXML_NOCDATA);
if (!$this->root) {
$xml = explode("\n", $xmlString);
$errors = libxml_get_errors();
foreach ($errors as $error) {
$e .= $this->getErrors($error, $xml);
}
mdump($e);
libxml_clear_errors();
}
//mdump($this->root);
$this->context = $context;
$this->localContext = $this->context;
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:23,代码来源:mxmlcontrols.php
示例19: associations
/**
* Operações com associações.
*/
public function associations()
{
// retrieve by Id
$this->getById(1);
foreach ($this->getUsuarios() as $usuario) {
$nome = $usuario->getPessoa()->getNome();
}
// adiciona um usuário existente a um setor
$usuario = new Usuario(1);
$usuario->setIdPessoa(3);
$usuario->setLogin('Novo Login');
$usuario->setPassword('123456');
$this->getUsuarios()->append($usuario);
$this->saveAssociation('usuarios');
// contagem de usuários em um setor
$n = $this->getUsuarios()->count();
// Salva associação com base no id dos usuários
$idUsuario = array(1, 3, 5, 6);
$this->saveAssociation('usuarios', $idUsuario);
mdump('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
$this->deleteAssociationById('usuarios', $idUsuario);
mdump('++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++');
}
开发者ID:joshuacoddingyou,项目名称:php,代码行数:26,代码来源:setor.php
示例20: uploadCxnSimpleText
/**
* Upload de sentenças de construções, em arquivo texto simples (uma sentença por linha).
* Parâmetro data informa: idConstruction, subCorpus e idLanguage
* @param type $data
* @param type $file
*/
public function uploadCxnSimpleText($data, $file)
{
$subCorpus = $data->subCorpus;
$idLanguage = $data->idLanguage;
$transaction = $this->beginTransaction();
$subCorpus = $this->createSubCorpusCxn($data);
$document = new Document();
$document->getbyEntry('not_informed');
try {
$sentenceNum = 0;
$rows = file($file->getTmpName());
foreach ($rows as $row) {
$row = preg_replace('/#([0-9]*)/', '', $row);
$row = trim($row);
if ($row[0] != '#' && $row[0] != ' ' && $row[0] != '') {
$row = str_replace('&', 'e', $row);
$row = str_replace(' < ', ' < ', $row);
$row = str_replace(' > ', ' > ', $row);
$row = str_replace(array('$.', '$,', '$:', '$;', '$!', '$?', '$(', '$)', '$\'', '$"', '$--', "’", "“", "”"), array('.', ',', ':', ';', '!', '?', '(', ')', '\'', '"', '--', '\'', '"', '"'), $row);
$replace = [' .' => ".", ' ,' => ',', ' ;' => ';', ' :' => ':', ' !' => '!', ' ?' => '?', ' >' => '>'];
$search = array_keys($replace);
$sentence = str_replace($search, $replace, $row);
mdump($sentence);
$text = $sentence;
$sentenceNum += 1;
$paragraph = $document->createParagraph();
$sentenceObj = $document->createSentence($paragraph, $sentenceNum, $text, $idLanguage);
$data->idSentence = $sentenceObj->getId();
$subCorpus->createAnnotationCxn($data);
}
}
$transaction->commit();
} catch (\EModelException $e) {
// rollback da transação em caso de algum erro
$transaction->rollback();
throw new EModelException($e->getMessage());
}
return $result;
}
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:45,代码来源:CorpusRepository.php
注:本文中的mdump函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论