Giter Club home page Giter Club logo

framework's Introduction

Mako Framework

Tests Static analysis

This is the Mako Framework core. You'll find the documentation at makoframework.com.

framework's People

Contributors

abidon avatar bertptrs avatar dependabot[bot] avatar freost avatar guffen avatar kaspergreen avatar letr0n avatar listo4ek avatar mattice avatar mvdnes avatar necklaces avatar ombratteng avatar sternk avatar thanapongp avatar thijsw avatar tobiaskappe avatar volter9 avatar wgevaert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework's Issues

Class 'app\models\Users' not found

The index.php file is the code:

namespace app\controllers
{
class Index
{
$users = new \app\models\Users();
}
}

In the file Users.php code looks like this:

namespace app\models
{
class Users
{
}
}

Locally, PHP 5.3.8, Windows Vista, it works.
After sending to the server (same version of PHP) is a bug:
Class 'app\models\Users' not found

I can not figure out the subtleties of the above.

bug with custom routes and regex?

there is some bug with the custom routes and optional arguments.

I have a custom route "account/user/create/(optional argument)"
when i enter the url "account/user/create" it redirects me to the 404, but it works with "account/user/create/10".

I wrote 2 custom routes to handle this, but i think there should be a possibility to handle this with 1 route?

Possibility to change document root to using 'php reactor server'

Hi,
I recently changed my document root to have more security.
I found following code:

$docroot = $this->cli->param('docroot', MAKO_APPLICATION_PARENT_PATH);

into

Server.php

Is possibile to customize the document root?
Maybe a custom

MAKO_SERVER_DOCROOT

Thanks!

mako comunity ?

any plans to expand mako with a forum or other tools to create a community ?

Few Typos, Suggestions & Questions

TYPO ERRORS:

  1. Misspelled the word database in app/config/sessions.php on line 21

(only required when using "Database" or "Redis" sessions)

  1. Missing fullstop on the second last line in http://makoframework.com/docs/autoloading

"The registerNamespace method allows you to register a PSR-0 compatible namespace with the autoloader"

  1. Mispelt the word caching as chaching in the second line in http://makoframework.com/docs/caching

"The cache class provides a simple and consistent interface to the most common chaching solutions:"

4.Mispelt the word input in explanation of input() method in http://makoframework.com/docs/cli/helper

"The inuput method will ask..."

  1. Mispelt the word builder in the second line of Query Builder description in http://makoframework.com/docs/databases/builder

"The query builer currently supports the following dialects:"

  1. Missing fullstop in the last sentence before the final code snippet in http://makoframework.com/docs/rest

"You can also set the $info parameter in the other methods to save a few lines of code"

  1. Missing ' in multiple PHPs in http://makoframework.com/docs/sessions. Think it should be PHP's
  2. Mispelt is_numeric in the comment in http://makoframework.com/docs/validation

"// Checks that the year is numeric using PHP's internal is_numaric function"

  1. Mispelt the word method in assign() description in http://makoframework.com/docs/views

"Assigning variables is done by using the assign medhod of the view class"

SUGGESTIONS:

  1. Downloadable/Offline Documentation
  2. Files Names: Matching the case of the class: I think we should encourage all files names to be in small caps.

Methods: We should allow foo_bar() as its very common in other languages.

Variables: $foobar and $foo_bar are very common and hence should be allowed too.

http://makoframework.com/docs/standards

Array Opening Braces: On same line or next? Check PSR Standards

http://makoframework.com/docs/configuration

  1. Should be able to create the mako_migrations table using the Reactor CLI.

http://makoframework.com/docs/databases/migrations

  1. Should be able to create the mako_sessions table using the Reactor CLI.

http://makoframework.com/docs/sessions/configuration

  1. Make Class Aliases on app/config/mako.php or any other place. Aliases make it more convenient to use namespaced classes. Instead of referring to the class using its full namespace, you may simply use the alias as defined there.
  2. Add more functions to the HTML helper

QUESTIONS:

  1. I tried to create a controller by the name Auth but when i tried to access, i was getting a 404 - Not Found Error. When i change it to Test or Account it worked. Does it mean Auth is a reserved name or what?
  2. Can you create sub-folders in the controllers folder like admin, accounts e.t.c? How do you access the classes in those sub-folders as i had errors trying it like http://localhost/app/admin/account/.
  3. Is there no Form helper and the web will involve using many forms most of the time?

PDO::__construct()

In app/config/database is the line:
'dsn' => 'sqlite:/' . MAKO_APPLICATION . '/storage/database/test.sqlite',
Is this slash is necessary?
In windows (xampp) causes an error.
After its removal, it works.

Authentication with ACL

Hi,
do you have a solution on how to manage user authentication with ACL?
Is there a best practice on Mako Framework?

Thank you!
Marco

Use Doctrine2 ORM and Twig

Hi, i have question,
how to if i want to use Doctrine2 ORM and Twig template engine in mako framework, thanks

Add bulk-insert functionality to the query builder

Make it possible to insert multiple rows

$rows = array
(
    array('username' => foo', 'password' => md5('foo123')),
    array('username' => bar', 'password' => md5('bar123')), 
);

Database::to('users')->insert($rows);

Form field values

Hi kula.
Would not it be preferred if the Input class to permit access to the form fields, as in the case of validation errors?

Add plural method to i18n class

I18n::plural() method. Inflection rules should be language based but not required when creating a language pack.

echo I18n::plural('car'); // cars
echo I18n::plural('car', 1); // car
echo I18n::plural('car', 2); // cars
echo I18n::plural('car', 2, 'en_GB'); // cars

Add support for bundles/plugins

There are classes that are useful but that should not be a part of the core (Gravatar, ReCaptcha...). They can still be useful and should be offered as official bundles/plugins.

Bundle/plugins should reside in a subdirectory of the app directory. They must contain a init/bootstrap file and at least one class. They should also be able to have own views, config files and language files.

Environment aware configuration

If MAKO_ENV is set to "dev" then the framework should load configuration files from /config/dev/* if not then it should load from the default /config/* path.

Apache: SetEnv MAKO_ENV dev
Nginx: fastcgi_param MAKO_ENV dev;
CLI: export MAKO_ENV=dev

Also make it possible to set the env when executing from the CLI?

php reactor --env=dev t foo:bar

Add query profiler to database class

If enabled then the profiler should log all queries with the execution time.

Connection::profiler() should return all queries and execution times for the connection.

$queries = $this->connection->profiler();

Database::profiler() should return all queries and execution times for all connections.

$queries = Database::profiler()

feature request toArray for database

hi

is possible to return array instead of object from Database::first ?
if so how ?
if not can you add to array for every database function that return only objects ?

Make mako\controller\Rest an interface

Making mako\controller\Rest an interface will allow you to easily make any controller restful

class Index extends \app\controllers\Base implements \mako\controller\Rest
{

}

Remove CLI support from framework and add a CLI tool instead

The framework currently be executed from both a browser and from the CLI. It would be better to have a stand-alone CLI tool that can run tasks instead.

php reactor task foo // runs the default action of the foo task
php reactor task foo:bar // runs the bar action of the foo task
php reactor task foo::bar.foo // runs foo action of the bar task from the foo bundle

Grouping assets

I think the function Assets::group()->add(), takes two parameters, such as Assets::add().
The documentation (http://makoframework.com/docs/assets) is described that only one.
Is: Assets::group('header')->add('/js/myscript.js');
Should be: Assets::group('header')->add('myscript', '/js/myscript.js');

A little typo

Typo in app / views / welcome.php it should be:

if(!is_writable(MAKO_APPLICATION . '/storage/cahce') || !is_writable(MAKO_APPLICATION . '/storage/logs')):
Make sure that the application/storage/cache and application/storage/logs directories are writable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.