當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model::delete方法代碼示例

本文整理匯總了PHP中Phalcon\Mvc\Model::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model::delete方法的具體用法?PHP Model::delete怎麽用?PHP Model::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phalcon\Mvc\Model的用法示例。


在下文中一共展示了Model::delete方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 public function delete()
 {
     foreach ($this->IgoListeValeur as $liste) {
         $liste->delete();
     }
     return parent::delete();
 }
開發者ID:nbtetreault,項目名稱:igo,代碼行數:7,代碼來源:IgoAttribut.php

示例2: delete

 /**
  * 刪除模型
  *
  * @return bool
  */
 public function delete()
 {
     if ($cache = static::getCache()) {
         $cache->delete(static::$cacheChildNamespace, array($this->{static::$primaryKey}));
     }
     return parent::delete();
 }
開發者ID:sujinw,項目名稱:passport,代碼行數:12,代碼來源:ModelProvider.php

示例3: delete

 public function delete()
 {
     foreach ($this->IgoGeometrie as $geometrie) {
         $geometrie->delete();
     }
     return parent::delete();
 }
開發者ID:nbtetreault,項目名稱:igo,代碼行數:7,代碼來源:IgoClasseEntite.php

示例4: delete

 public function delete()
 {
     $ref = new ReflectionClass($this);
     if ($ref->hasProperty('deleted_at')) {
         return $this->deleted_at ? true : $this->save(['deleted_at' => date('Y-m-d H:i:s')]);
     } else {
         return parent::delete();
     }
 }
開發者ID:rj28,項目名稱:test,代碼行數:9,代碼來源:Model.php

示例5: delete

 public function delete()
 {
     $response = array();
     if (parent::delete() == false) {
         foreach (parent::getMessages() as $message) {
             $response['errors'][] = (string) $message;
         }
     } else {
         $response['msg'] = 'ok';
     }
     return $response;
 }
開發者ID:Archcry,項目名稱:PhalconApiBase,代碼行數:12,代碼來源:Model.php

示例6: deleteItem

 /**
  * @param Model $item
  *
  * @return bool Deletion succeeded/failed
  */
 protected function deleteItem(Model $item)
 {
     return $item->delete();
 }
開發者ID:huzhaer,項目名稱:phalcon-rest,代碼行數:9,代碼來源:ResourceCrud.php

示例7: delete

 public function delete()
 {
     foreach ($this->IgoCoucheContexte as $groupe) {
         $groupe->delete();
     }
     return parent::delete();
 }
開發者ID:benoitlesp,項目名稱:igo,代碼行數:7,代碼來源:IgoContexte.php

示例8: delete

 public function delete()
 {
     foreach ($this->IgoCouche as $couche) {
         $couche->delete();
     }
     foreach ($this->IgoAttribut as $attribut) {
         $attribut->delete();
     }
     return parent::delete();
 }
開發者ID:nbtetreault,項目名稱:igo,代碼行數:10,代碼來源:IgoGeometrie.php

示例9: delete

 public function delete()
 {
     foreach ($this->IgoCoucheContexte as $groupe) {
         $groupe->delete();
     }
     foreach ($this->IgoPermission as $permission) {
         $permission->delete();
     }
     foreach ($this->IgoClasse as $classe) {
         $classe->delete();
     }
     return parent::delete();
 }
開發者ID:nbtetreault,項目名稱:igo,代碼行數:13,代碼來源:IgoCouche.php

示例10: deleteModel

 /**
  * Elimina el modelo pasado por parametro y carga el mensaje que ha sido pasado por párametro en el flashSession,
  * En caso de error genera una excepción
  * @param \Phalcon\Mvc\Model $model
  * @param String $successMsg
  * @return boolean
  * @throws InvalidArgumentException
  */
 protected function deleteModel($model, $successMsg)
 {
     if ($model->delete()) {
         $this->flashSession->warning($successMsg);
         return true;
     }
     $m = "";
     foreach ($model->getMessages() as $msg) {
         $m .= $msg . "<br>";
     }
     throw new InvalidArgumentException($m);
 }
開發者ID:willmontiel,項目名稱:sayvot,代碼行數:20,代碼來源:ControllerBase.php


注:本文中的Phalcon\Mvc\Model::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。