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
ファイル: FTest.php プロジェクト: aoimedia/kosmonautensofa
 public function testDirname()
 {
     $this->assertEquals(dirname($this->contentFile), f::dirname($this->contentFile));
 }
コード例 #2
0
ファイル: wizard.php プロジェクト: buditanrim/kirby-comments
 /**
  * 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);
 }