Exemplo n.º 1
0
 static function start($package, $mode = 'dev')
 {
     register_shutdown_function(array(get_class(), 'finalize'));
     ob_start();
     so_error::monitor();
     foreach (parse_ini_file(so_file::make('php.ini')) as $key => $value) {
         ini_set($key, $value);
     }
     so_page::$mode = $mode;
     so_package::$defaultName = $package;
     so_query::$resourcePrefix = $package;
     $front = so_front::make();
     $query = $front->uri->query;
     $resource = $query->resource;
     $uriStandard = $resource->uri;
     if ($query->uri != $uriStandard) {
         return static::$response = so_output::moved((string) $uriStandard);
     }
     static::$response = $resource->execute($front->method, $front->data);
 }
Exemplo n.º 2
0
 function content_store($data)
 {
     return so_content::make(so_page::make($data));
 }