protected function method()
 {
     if (Builder::get()) {
     }
     $code = array_map(function ($line) {
         return $line ? '  ' . $line : $line;
     }, explode("\n", $code));
     return sprintf("if (%s)\n{\n%s}\n", implode(' && ', $conditions), $code);
 }
コード例 #2
0
ファイル: Datatables.php プロジェクト: testoodoo/OoodooSiteUp
 /**
  * Gets results from prepared query
  *
  * @return null
  */
 private function getResult()
 {
     $this->result_object = $this->query->get();
     if ($this->query_type == 'builder') {
         $this->result_array = array_map(function ($object) {
             return (array) $object;
         }, $this->result_object);
     } else {
         $this->result_array = array_map(function ($object) {
             return (array) $object;
         }, $this->result_object->toArray());
     }
 }
コード例 #3
0
ファイル: submenu-builder.php プロジェクト: nocttuam/lyric
 /**
  * Call WordPress function to add the menu page.
  */
 public function add_menu()
 {
     add_submenu_page($this->parent->get('slug'), $this->page_title, $this->title, $this->capability, $this->slug, [$this, 'callback']);
 }