Beispiel #1
0
 /**
  * Create the filename for a resource.
  * Overloaded to add controller file support
  *
  * @param	string	The resource type to create the filename for.
  * @param	array	An associative array of filename information. Optional.
  * @return	string	The filename.
  */
 public function _createFileName($type, $parts = array())
 {
     $filename = '';
     switch ($type) {
         case 'controller':
             if (empty($parts['name'])) {
                 $parts['name'] = 'controller';
             }
             if (!empty($parts['protocol'])) {
                 $parts['protocol'] = '.' . $parts['protocol'];
             }
             $filename = strtolower($parts['name']) . $parts['protocol'] . '.php';
             break;
         case 'view':
         default:
             $filename = parent::_createFileName($type, $parts);
             break;
     }
     return $filename;
 }