dirname() static public method

Just an alternative for dirname() to stay consistent
static public dirname ( string $file = __FILE__ ) : string
$file string The path
return string
示例#1
0
 public function testDirname()
 {
     $this->assertEquals(dirname($this->contentFile), f::dirname($this->contentFile));
 }
示例#2
0
 /**
  * Create and add a new tab to the wizard dialog.
  *
  * @param  array  $step  Optional attributes
  */
 public function add($step = array())
 {
     $index = count($this->queue) + 1;
     $base = f::dirname($this->file);
     // Provide default values for each step
     $defaults = array('title' => sprintf(l('comments.wizard.title', 'Step %s'), $index), 'desc' => '', 'url' => $this->url($index), 'index' => $index, 'base' => $base, 'template' => 'steps' . DS . 'step-' . $index, 'required' => true, 'rules' => array(), 'wizard' => $this);
     // Create a new view with the given attributes
     $scope = array_merge($defaults, $step);
     $partial = $base . DS . $scope['template'] . '.php';
     return $this->queue[] = $this->nest('content', $partial)->with($scope);
 }