コード例 #1
0
ファイル: Entity.php プロジェクト: philip-dakno/basecamp
 public function findTodoItemBySchemaIndex(Schema $schema, $milestoneSchemaKey, $todoListSchemaKey, $todoItemSchemaKey)
 {
     foreach ($schema->getMilestones() as $x => $schemaMilestone) {
         if ($x != $milestoneSchemaKey) {
             continue;
         }
         $milestone = $this->findMilestoneByTitle($schemaMilestone->getTitle());
         if ($milestone === null) {
             break;
         }
         foreach ($schemaMilestone->getTodoLists() as $y => $schemaTodoList) {
             if ($y != $todoListSchemaKey) {
                 continue;
             }
             $todoList = $this->findTodoListByName($schemaTodoList->getName());
             if ($todoList === null) {
                 break;
             }
             foreach ($schemaTodoList->getTodoItems() as $z => $schemaTodoItem) {
                 if ($z != $todoItemSchemaKey) {
                     continue;
                 }
                 return $todoList->findTodoItemByContent($schemaTodoItem->getContent());
             }
         }
     }
     return null;
 }
コード例 #2
0
ファイル: Service.php プロジェクト: philip-dakno/basecamp
 public function getSchemaInstance()
 {
     $schema = new Schema();
     $schema->setService($this);
     return $schema;
 }