Subversion Repositories TypeFriendly

[/] [trunk/] [includes/] [resources.php] - Rev 5

Compare with Previous | Blame | Download | View Log

<?php
/*
  --------------------------------------------------------------------
                           TypeFriendly
                 Copyright (c) 2008 Invenzzia Team
                    http://www.invenzzia.org/
                See README for more author details
  --------------------------------------------------------------------
  This file is part of TypeFriendly.
                                                                   
  TypeFriendly is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  TypeFriendly is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with TypeFriendly. If not, see <http://www.gnu.org/licenses/>.
*/

// $Id: resources.php 5 2008-07-02 17:49:20Z zyxist $

    class tfResources
    {
        public $outputs;
       
        private $pr;
       
        static private $instance;
       
        static public function get()
        {
            if(is_null(tfResources::$instance))
            {
                tfResources::$instance = new tfResources;
            }
            return tfResources::$instance;
        } // end get();
       
        private function __construct()
        {
            $app = tfProgram::get();
           
            // Load outputs
            $list = $app->fs->listDirectory('outputs/', true, false);
            foreach($list as &$item)
            {
                if(strpos($item, '.php') !== false)
                {
                    $item = substr($item, 0, strlen($item) - 4);
                }
            }
            $this->outputs = $list;
        } // end __construct();
    } // end tfResources;
 

Compare with Previous | Blame | Download | View Log