예제 #1
0
 /**
  * @param $source
  * @return string
  */
 private function addTarget($source)
 {
     if (String::isNotEmpty($this->getTarget())) {
         $source .= ' target="' . $this->target . '"';
         return $source;
     }
     return $source;
 }
예제 #2
0
 /**
  * @param $controller
  * @param $directory
  * @return array|string
  */
 private static function loadSpecificController($controller, Directory $directory)
 {
     $className = '';
     if (String::isNotEmpty($controller)) {
         $fileName = self::findControllerFilename($controller, $directory);
         /** @noinspection PhpIncludeInspection */
         include_once $fileName;
         $className = self::generateClassName($fileName);
         $className = String::replace('.php', '', implode('\\', $className));
         return $className;
     }
     return $className;
 }
예제 #3
0
 /**
  * @param $source
  * @return string
  */
 protected function addId($source)
 {
     if (String::isNotEmpty($this->getCssId())) {
         $source .= ' id="' . $this->getCssId() . '"';
         return $source;
     }
     return $source;
 }
예제 #4
0
 /**
  *
  */
 public function testIsNotEmptyWithWrongDatatype()
 {
     $this->assertFalse(String::isNotEmpty(['a', 'b', 'c']));
 }