Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- namespace localhost\illiFW\dev;
- use ILLI\Core\Marshal\Collection\Builder as CollectionBuilder;
- use ILLI\Core\Marshal\Record\Builder as RecordBuilder;
- use ILLI\Core\Marshal\Relation\Builder as RelationBuilder;
- use ILLI\Core\Marshal\Collection\Generic as GenericCollection;
- use ILLI\Core\Marshal\Record\Generic as GenericRecord;
- use ILLI\Core\Marshal\Type\Builder as TypeBuilder;
- use ILLI\Core\Marshal\Type\Generic as GenericType;
- use ILLI\Core\Marshal\Manager as Manager;
- use ILLI\Core\Marshal\iManager as iManager;
- use ILLI\Core\Marshal\Type\iType as iType;
- use ILLI\Core\Marshal\Relation\iRelation as iRelation;
- require_once 'ILLI/illi.php';
- try
- {
- \Server\Init::setup();
- \Server\Init::development();
- \Server\Init::debug();
- \Server\Init::illi();
- $info = (new \ILLI\Core\Web\Controller\Controller)->collect('posts')->fromDB;
- $type = new GenericType;
- $type->setIdentityField($info[iType::PROP_IDENTIFY_FIELD]);
- $type->setIndexFields($info[iType::PROP_INDEX_FIELDS]);
- $type->setRecordClass('\ILLI\Marshal\Record\Generic');
- $type->setRecordBuilder(new RecordBuilder);
- $type->setCollectionBuilder(new CollectionBuilder);
- var_dump($type);
- $type_builder = new TypeBuilder;
- $relation_builder = new RelationBuilder;
- $manager = new Manager($type_builder, $relation_builder, $types);
- foreach($manager->getTypes() as $type) {
- $obj = $manager->{$type}->load($data[$type]);
- }
- var_dump($manager);
- }
- catch(\Exception $e)
- {
- print PHP_EOL;
- print PHP_EOL;
- print '{{{ ';
- print PHP_EOL;
- print __FILE__.'@'.__LINE__;
- print PHP_EOL;
- var_dump($e);
- print PHP_EOL;
- print '}}}';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement