2017 © Pedro Peláez
 

library ant-framework-php

Ant framework. A small tool for big purpose.

image

shubinmi/ant-framework-php

Ant framework. A small tool for big purpose.

  • Wednesday, March 15, 2017
  • by shubinmi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Ant framework

A small php tool for big purpose

The concept - to know its place and purpose. The rule of this framework - to be flexible and not to be intrusive., (*1)

Installation

Install the latest version with, (*2)

$ composer require shubinmi/ant-framework-php

Basic Usage

All examples here.., (*3)

index.php, (*4)

loadConfig($configDirs);
$app->run();
```

./Config/Production/router.php
```php
 [
        'main'                   => [
            ['GET', 'POST'], '/[{msg}[/]]', [
                'controller' => 'Controllers\Main',
                'action'     => 'mainAction'
            ]
        ]
     ]
]
```

./Config/Local/router.php
```php
 [
        // This will be rewriting rulles for path with 'main' key at Production folder
        'main'                   => [
            ['GET', 'POST'], '/[{msg}[/]]', [
                'controller' => 'Controllers\Main',
                'action'     => 'mainAction'
            ]
        ]
     ]
]
```

./Controllers/Main.php
```php
getRequestUriParam('msg');
        $elements = [
            // It mean that {{body}} at layout.phtml (and at other view elements) will be 
            // replaced to content from main.phtml
            'body' => [
                'path' => 'Views/main.phtml',
                'vars' => ['msg' => $msg]
            ]
        ];
        
        return $this->getView()->addLayoutElements($elements);
    }
    
    private function getView()
    {
        $view = new View();
        $view->setLayoutPath('Views/layout.phtml');
        
        return $view;
    }
}

```

./Views/layout.phtml
```html








    
    {{body}}



```

./Views/main.phtml
```php
Your message = "

"

Roadmap

  • [x] Core Framework
  • [ ] + Examples (Add to advance DI)
  • [ ] + Tests
  • [ ] + Validators
  • [ ] + RPC API
  • [ ] + RestFull API
  • [ ] + Web sockets API

The Versions

15/03 2017

dev-master

9999999-dev https://github.com/shubinmi/ant-framework-php

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

15/03 2017

1.1.2

1.1.2.0 https://github.com/shubinmi/ant-framework-php

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

13/03 2017

1.1.1

1.1.1.0 https://github.com/shubinmi/ant-framework-php

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

13/03 2017

1.1.0

1.1.0.0 https://github.com/shubinmi/ant-framework-php

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

19/11 2016

1.0.3

1.0.3.0 https://github.com/shubinmi/ant

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

19/11 2016

1.0.2

1.0.2.0 https://github.com/shubinmi/ant

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

03/11 2016

1.0.1

1.0.1.0 https://github.com/shubinmi/ant

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant

27/10 2016

1.0.0

1.0.0.0 https://github.com/shubinmi/ant

Ant framework. A small tool for big purpose.

  Sources   Download

BSD-3-Clause

The Requires

 

framework ant