Skills: PHP / SYMFONY / VUE JS
theratg / miao Goto Github PK
View Code? Open in Web Editor NEWphp framework
php framework
phpunit
pmd and etc...
It need change default message.
Example
$validator = new Miao_Form_Validate_Email();
$validator->setMessage( Miao_Form_Validate_Email::INVALID, 'my message' );
Now _init work after construct and object does not have link with office.
->addValidator( array( 'Login') ); не выдает ошибку даже если класса нет
В некоторых случаях нужно сбрасывать форму.
Если processIsolation=true, то при запуске большого кол-ва тестов скрипт падает.
Если processIsolation=false, то не работают тесты с использованием сессий.
Нужно сбрасывать сообщения об ошибках тоже.
Change logic instance framework and office module
//$_GET['spId'] = 0
$spId = $request->getValueOf('spId',null,true);
//выдает null вместо 0
Change Miao_form logic.
Autoload. Fatal error if did not find class with namespace
$items = explode( '_', $className );
and
не работает eval
Create and load form
// .php
//data from form
$_POST['groupUrl']['title'][] = 'link1';
$_POST['groupUrl']['title'][] = 'link2';
$_POST['groupUrl']['url'][] = 'link1';
$_POST['groupUrl']['url'][] = 'link2';
//create form
$attributes = array();
$form = new Miao_Form( 'from_company_news' );
$form->addGroup( 'groupUrl',
array(
new Miao_Form_Control_Text( 'title', $attributes ),
new Miao_Form_Control_Text( 'url', $attributes ) ) );
$form->isValid( $_POST );
?>
Template block
// .tpl
<?php foreach ( $form->groupUrl as $item ):?>
<input type="text" name="<?=$item->title->getName()?>" value="<?=$item->title->getValue()?>" />
<span style="color: red"><?=$item->title->error()?></span>
<input type="text" name="<?=$item->url->getName()?>" value="<?=$item->url->getValue()?>" />
<span style="color: red"><?=$item->url->error()?></span>
<?php endforeach;?>
Rendered template
//.html
<input type="text" name="groupUrl[ title ][]" value="link1" />
<span style="color: red"></span>
<input type="text" name="groupUrl[ url ][]" value="url1" />
<span style="color: red"></span>
<input type="text" name="groupUrl[ title ][]" value="link2" />
<span style="color: red"></span>
<input type="text" name="groupUrl[ url ][]" value="url2" />
<span style="color: red"></span>
Не работают выражения типа.
isset( Miao_Session::getNamespace( 'space' ), 'var' );
Необходим инструментарий для управления доступом пользователей на основе ролей. В частности это касается функционала бэкофиса, но может понадобиться и для фронтофиса.
Тут http://labs.nsadovnikova.dv.rbc.ru/?_view=Request_Item&pId=26
если форме давать уникальное имя , то при переходе из проекта в проект форма кешируется, как при неуникальном имени.
Написать про Office
_includeTemplate( $this->_getViewTemplate())?>use get_called_class
Написать про множественные route
public function __construct(array $data = null)
{
$this->_method = isset($_SERVER['REQUEST_METHOD']) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';
$this->resetVars($data);
}
public function resetVars(array $data = null)
{
$method = $this->_method;
if ($method == 'HEAD') {
$method = 'GET';
}
if (is_null($data)) {
$this->_vars = $GLOBALS['_' . $method];
$this->_vars = array_merge_recursive($this->_vars, $_FILES);
}
}
Change return value (getValue)
Тестировал так
php ./index.php ./route.xsd ./route.xml Router
можно так
php ./index.php ./route.xsd ./route.xml
Последний параметр указывает на тэг, с которого начинать проверку.
./route.xml - ваш дэлевский xml с исправленный порядком тэгов, но я не уверен, что я его не испахабил, так что проверьте перед коммитом.
Google Drive\MiaoWorld\Miao
Добавить в секцию xml route тег , который будет использоваться как комментарий в методе генерации makeRewrite(), если тег пуст, то подставлять значение тега <view|action|viewBlock>
Need fix default glue script
Where is Front Office module?
Упростить конструктор
Name - нужно только view
Убрать функциональность множества шаблонов. Из практики видно, что пользователь лучше создаст два шаблона или один с инклюдами.
Miao Router, ошибка с единственным route
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.