Пример #1
0
 public function __construct($blog_path = null, $limit = 5)
 {
     parent::__construct();
     $this->props['articles'] = 5;
     $this->props['blog_path'] = 5;
     $this->props['limit'] = 5;
     $this->props['log'] = 5;
     $this->log = new STF_Logger(STF_Logger::LOG_LEVEL_WARN);
     // $this->log->echo_output = true;
     $this->log->file_output = true;
     $this->limit = $limit;
     if (is_string($blog_path)) {
         $this->init($blog_path);
     }
 }
Пример #2
0
 public function __construct($route, $is_dir = false, $type = null, $path = null, $meta_data = null)
 {
     parent::__construct();
     $this->route = $route;
     $this->is_dir = $is_dir;
     // if is_dir and path has no content list files within path
     $this->path = $path;
     $this->type = !empty($type) ? $type : self::ROUTE_TYPE_NORMAL;
     if (!is_null($meta_data) && !is_array($meta_data)) {
         throw new STF_Net_URI_RouteException('The $meta_data argument must be a named array. Argument type ' . gettype($meta_data) . ' not supported.', 1);
     }
     $this->meta_data = !is_null($meta_data) ? $meta_data : array();
     // 1 = readable; 2 = writable; 4 = isset //
     $this->props['content'] = 5;
     $this->props['is_dir'] = 5;
     $this->props['meta_data'] = 5;
     $this->props['path'] = 5;
     $this->props['route'] = 5;
     $this->props['type'] = 5;
 }