Download the PHP package taviroquai/architectphp without Composer

On this page you can find all versions of the php package taviroquai/architectphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package architectphp

Architect PHP Framework

Architect PHP Framework uses a pragmatic and modular Web development approach. The idea is to create a small API but with the most common features in web development.

Latest Stable Version Build Status Scrutinizer Quality Score Total Downloads

Online Demo

An online demo can be found in http://marcoafonso.pt/tests/architect/

Install

Look at demo repository at https://github.com/taviroquai/architect-demo/

Main features

Common features

Most features can be called in 1 line of code, ie. app()->featureName(). If you prefer to use functions style, there are also core functions aliases. Se below.

This is an on-going work and there is not yet a stable version

Theme Configuration without programming skills

/theme/default/slots.xml

<config>
    <slot name="topbar">
        <module>
            <classname>LoginNavView</classname>
        </module>
    </slot>
</config>

Idiom configuration without programming skills

/idiom/en/default.xml

<items>
    <item key="TITLE">Architect PHP Framework</item>
</items>

API usage examples

All code has type hinting in ie. NetBeans IDE, so it's easy to start.

ALIAS

Architect framework is built using OOP but if you prefer to use functions code styling there are also core function aliases that may speed up development. The first letter gives an idea of what it does. Remember to use IDE type hinting to know how the alias works.

app() - Application. The main gate to access features
conf() - Configuration item. Returns a configuration item
view() - Returns the generic view factory
help() - Returns the helper factory
theme() - Loads a theme or returns current theme
session() - Sets or gets a session item
redirect() - Sends location HTTP header and save session before exit
filter() - calls Input to sanitize an input param
r() - Route. Adds a new route
c() - Content. Adds content to the default theme
u() - URL. Returns an internal URL. Use this to generate internal URLs
m() - Message. Adds a message to be shown to the user
i() - Returns all input parameters or just one from GET/POST
j() - JSON. Sets JSON output
o() - Output. Sets the application Output, ie. a View or plain text
f() - FILES. Returns a FILES entry by index
q() - Query table. Returns a Table instance to start querying
s() - Secure. Returns a secured (encrypted) string
e() - Event. Adds a new event
tr() - TRigger. Triggers the event
v() - View. Creates a new view. You can pass a template file path
l() - Layout. Creates a new layout - a view with layout slots operations

APP

app() // returns the application instance

ROUTER

r('/my/path/(:any)', function ($param) { ... }); // Adds a route callback

THEME

c('Hello World!'); // Adds content to default theme

URL

u('/demo', array('param1' => 'World')); // creates an URL

INPUT (GET / POST / RAW / FILES / CLI ARGS)

i('username'); // returns $_GET['username'] or $_POST['username']
f(0); // returns $_FILES['file'] or $_FILES['file'][0] for multiple

EVENTS

e('my.event.name', function($target) { ... }); // Register an event
tr('my.event.name', $target); // Triggers an event and passes a variable

CORE EVENTS

There are core events that allows to change application workflow without changing the core system. These are:

'arch.module.after.load'
'arch.database.load'
'arch.session.load'
'arch.theme.load'
'arch.action.before.call'
'arch.output.before.send'
'arch.session.save'
'arch.before.end'

IDIOM

$i = help()->createIdiom();  // tries to find a default idiom by session or input
$i->loadTranslation('filename', 'optional module name'); // loads a translation file
$i->translate('key', array('key' => 'World')); // returns translated key in filename
$i->t('TITLE'); // An alias to use in templates

SCREEN MESSAGES

m('An error has occured', 'css class'); // Adds a flash message
app()->flushMessages(); // Returns array. Remember to call flush in template

CAPTCHA

$v = view()->createAntiSpam(); // returns an HTML antispam element
$v->validate(); // validates antispam code (saved in session)

ENCRYPTION

s('secure this string'); // returns an encrypted string (crypt)

REDIRECT

redirect('http://www.google.com'); // redirects to an url

VALIDATION

$v = help()->createValidator();
$rules[] = $v->createRule('email', 'IsEmail', 'Invalid email message);
$result = $v->validate($rules); // more rules at /src/Arch/Rule/
app()->getSession()->loadMessages($v->getMessages());

HTTP

$curl = help()->createCurl('http://google.com'); // gets a Curl helper
$result = $curl->run(); // Gets the URL response
$curl->closeConnection(); // Closes the cURL handler

FILE UPLOAD

$v = view()->createFileUpload(); // Creates an upload field
$v->upload(f($index), '/var/www/architect/theme/data'); // uploads a file

DOWNLOAD

$helper = help()->createDownload('/var/www/architect/theme/data/image.jpg');
$helper->execute(); // forces a file download

DATABASE

q('user')->s()->w('id = ?', array(1))->run(); // select user where id = 1
q('user')->i(array('username' => 'admin'))->run(); // insert into user
q('user')->u(array('username' => 'guest'))->w('id = ?', array(1))->run(); // update
q('user')->d('id = ?', array(1))->run(); // delete from user where id = 1
q('user')->s('group.*')->j('usergroup', 'usergroup.id_group = group.id')->run(); // join

BREADCRUMBS VIEW

view()->createBreadcrumbs(); // returns a breadcrumbs view

DATEPICKER VIEW

view()->createDatepicker(); // returns a date picker view

PAGINATION VIEW

view()->createPagination(); // returns a pagination view

TEXT EDITOR VIEW

view()->createTexteditor(); // returns a text editor view

POLL VIEW

view()->createPoll(); // returns a poll view

LINE CHART VIEW

$data = array(
    array("x" => "2011 W27", "y" => 100),
    array("x" => "2011 W28", "y" => 500)
);
$chart = view()->createLineChart() // returns a new line chart view
    ->set('data', $data)
    ->set('labels', array('Sells'));

TREE VIEW

view()->createTreeView();

FILE EXPLORER VIEW

$explorer = view()->createFileExplorer();
$explorer->setPath($path);

IMAGE GALLERY VIEW

$gallery = view()->createImageGallery()
    ->setPath($path)
    ->setPathToUrl(conf('BASE_URL').$path); // relative url

MAP VIEW

view()->createMap();

CAROUSEL VIEW

view()->createCarousel(); // returns a carousel view

COMMENT FORM VIEW

view()->createCommentForm(); // returns a comment form view

FILE UPLOAD VIEW

view()->createFileUpload(); // returns a file upload view

AUTO TABLE VIEW

$config = array(
    'table'     => 'demo_user',
    'select'    => 'demo_user.*',
    'columns'   => array(
        array('type' => 'value', 'label' => 'Email', 'property'  => 'email'),
        array('type' => 'action',   'icon'  => 'icon-edit', 
            'action' => u('/demo/crud/'), 'property' => 'id')
    )
);
$v = view()->createAutoTable(); // returns an html table view
$v->configure($config, $db);
$v->setPagination($pagination);

AUTO FORM VIEW

$config = array(
    'table'     => 'demo_user',
    'select'    => 'demo_user.*',
    'action'    => u('/demo/crud/save'),
    'items'     => array(
        array('type' => 'hidden',   'property'  => 'id'),
        array('type' => 'label',    'label' => 'Email'),
        array('type' => 'text',     'property'  => 'email'),
        array('type' => 'breakline'),
        array('type' => 'submit',   'label' => 'Save', 
            'class' => 'btn btn-success inline')
    )
);
$v = view()->createAutoForm(); // returns an html form view
$v->configure($config, $db);

ROAD MAP (TODO)

January 2014 - Version 1.0.0-beta
February 2014 - Version 1.0.0


All versions of architectphp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package taviroquai/architectphp contains the following files

Loading the files please wait ....