Download the PHP package arzynik/cana without Composer

On this page you can find all versions of the php package arzynik/cana. 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 cana

completely awesome & naturally amazing

cana is an mvc php framework for rapid object oriented development. it combines existing php framework fundamentals found in frameworks such as zend, and combines it with easy to use, extended object support found in ruby, python, and jquery. cana's name speaks for itself.

some cool shit you can do

grab an object from the database and cache it in mem

$shot = new BigBrother_Shot('DEV_DSM_000');

or do the same thing but with auto object creation, auto class aliasing, and removing the unnecessary quotes

$shot = Shot::o(DEV_DSM_000);

call a function on multiple database objects

Shot::o(DEV_DSM_000,DEV_DSM_100)->delete();

set a property on multiple objects and save them back to the db

echo Staff::o(DSM,MPR,SSW)->s('permission','MANAGER')->save();

set multiple properties on an object an save it

Shot::o(DEV_DSM_000)->s([
    'date_due' => '2012-01-01',
    'id_deliv_group' => 'LUMA'
])->save();

output a database object as json

echo Shot::o(DEV_DSM_000)->json();

or output multiple database objects as a single json object

echo Shot::o(DEV_DSM_000,534)->json();

modify several objects properties from a db query

c::db()->get('select * from shots where id_project="marvel"')->producer = 'DSM';

iterate using the db object

foreach (c::db()->get('select * from shots where id_project="marvel"') as $shot) {
    print_r($shot);
}

set the producer property of two objects, then access those dbos from their cache and output their producer property

Shot::o(DEV_DSM_000,534)->producer = 'DSM';
echo Shot::o(DEV_DSM_000)->producer;
echo Shot::o(534)->producer;

this filter would be the same as this sql ((id_project=dev AND shot_name=DSV_DSM_000) OR (id_shot=534))

echo Shot::o(
        ['shot_name' => 'peanuts', 'id_project' => 'dev'],
        '{"shot_name": "BACON"}',
        DEV_DSM_000,
        '534'
    )->filter(
        ['id_project' => 'dev', 'shot_name' => 'DEV_DSM_000'],
        ['id_shot' => '534']
    );

filter a set of objects to set the producer property on only specific items, then return the full set

$shots = Shot::o(['shot_name' => 'peanuts'],'{"shot_name": "BACON"}',DEV_DSM_000,534)
    ->filter('id_project','devs')
    ->set('producer','DSM')
    ->parent();

access the last items in the set

echo Shot::o('{"shot_name": "BACON"}',DEV_DSM_000,'534')->eq(-1);

constructing a set with several arguments, arrays, or sets, will merge the items insite

i::o(Shot::o(534),Shot_Element::o(4944))->each(function($key, $item) {
    echo $this;
});

create a set from an already existing array sand iterate through them using foreach

foreach (i::o(Project::o('marvel')->shots(), Project::o('uw4')->shots()) as $shot) {
    echo $shot;
}

use the query method to build a set, then loop through each item

Shot_Element::q('
    select elements.* from tasks
    left join elements on elements.id_shot_element=tasks.id_shot_element
    left join shots on shots.id_shot=elements.id_shot
    left join projects on projects.id_project=shots.id_project
    where id_element="PLATE"
    and id_task_status="NONE"
    and id_elem_status!="FINL"
    and elements.id_deliv_group!="CUT"
    and (elements.id_staff="TDA" or elements.id_staff="JPR")
    and shots.active=1
    and projects.active=1
')->e(function($item) { 
    // do some cool stuff here
 });

create the test function on the base cana object. this puts the function easily accesable in the global scope

c::extend(['test' => function() {
    return 'this is a test';
}]);
echo c::test();

extend a class with a function that can access the object

Staff::extend(['simpleFunc' => function($me, $in) {
    echo get_class($me).' '.$in;
}]);
Staff::o(DSM)->simpleFunc('got this');

extend a class to return a set result

Staff::extend(['devices' => function($me) {
    return $me->q('select * from device where id_staff="'.$me->id_staff.'"');
}]);
Staff::o(DSM)->devices()->each(function($key, $item) {
    print_r($item);
});

other stuff

cana is named after my new favorite bar here in LA -- Caña Rum Bar


All versions of cana with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 arzynik/cana contains the following files

Loading the files please wait ....