当前位置: 首页>>代码示例>>PHP>>正文


PHP Assert::isFalse方法代码示例

本文整理汇总了PHP中Assert::isFalse方法的典型用法代码示例。如果您正苦于以下问题:PHP Assert::isFalse方法的具体用法?PHP Assert::isFalse怎么用?PHP Assert::isFalse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assert的用法示例。


在下文中一共展示了Assert::isFalse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setSlotId

 /**
  * @return Autoloader
  */
 function setSlotId($slotId)
 {
     Assert::isScalar($slotId);
     Assert::isFalse($this->isInitialized, 'too late to set slotId: already initialized');
     $this->slotId = $slotId;
     return $this;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:10,代码来源:Autoloader.class.php

示例2: add

 /**
  * @throws WrongArgumentException
  * @return Form
  **/
 public function add(BasePrimitive $prm)
 {
     $name = $prm->getName();
     Assert::isFalse(isset($this->primitives[$name]), 'i am already exists!');
     $this->primitives[$name] = $prm;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:11,代码来源:PlainForm.class.php

示例3: __construct

 function __construct($key)
 {
     //TODO ClientRequest
     Assert::isFalse(headers_sent() || Response::isFinished(), 'Yup! Headers are already sent so the storage cannot work properly.');
     ob_start();
     $this->basekey = $key . Session::userSupertag(true);
     $this->key = $this->sign($key);
 }
开发者ID:phoebius,项目名称:proof-of-concept,代码行数:8,代码来源:CookieStorage.class.php

示例4: getOpenPoint

 /**
  * @throws WrongArgumentException
  * @return LogicalChain
  **/
 public static function getOpenPoint($left, $right, $point)
 {
     Assert::isFalse($point === null, 'how can i build logic from emptyness?');
     $point = new DBValue($point);
     $chain = new LogicalChain();
     $chain->expOr(Expression::orBlock(Expression::andBlock(Expression::notNull($left), Expression::notNull($right), Expression::between($point, $left, $right)), Expression::andBlock(Expression::isNull($left), Expression::ltEq($point, $right)), Expression::andBlock(Expression::isNull($right), Expression::ltEq($left, $point)), Expression::andBlock(Expression::isNull($left), Expression::isNull($right))));
     return $chain;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:12,代码来源:LogicUtils.class.php

示例5: toHtml

 function toHtml(array $htmlAttributes = array())
 {
     Assert::isFalse(isset($htmlAttributes['name']));
     Assert::isFalse(isset($htmlAttributes['multiple']));
     $htmlAttributes['name'] = $this->getName() . '[]';
     $htmlAttributes['multiple'] = 'multiple';
     return HtmlUtil::getContainer('select', $htmlAttributes, join("", $this->getOptions()));
 }
开发者ID:phoebus,项目名称:HTML_FormAbstraction,代码行数:8,代码来源:SelectMultiFormControl.class.php

示例6: addTable

 /**
  * @throws WrongArgumentException
  * @return DBSchema
  **/
 public function addTable(DBTable $table)
 {
     $name = $table->getName();
     Assert::isFalse(isset($this->tables[$name]), "table '{$name}' already exist");
     $this->tables[$table->getName()] = $table;
     $this->order[] = $name;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:12,代码来源:DBSchema.class.php

示例7: addColumn

 /**
  * @throws WrongArgumentException
  * @return DBTable
  **/
 public function addColumn(DBColumn $column)
 {
     $name = $column->getName();
     Assert::isFalse(isset($this->columns[$name]), "column '{$name}' already exist");
     $this->order[] = $this->columns[$name] = $column;
     $column->setTable($this);
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:12,代码来源:DBTable.class.php

示例8: finish

 function finish()
 {
     Assert::isFalse($this->isFinished, 'already finished');
     $this->isFinished = true;
     // http://php-fpm.anight.org/extra_features.html
     // TODO: cut out this functionality to the outer class descendant (e.g., PhpFpmResponse)
     if (function_exists('fastcgi_finish_request')) {
         fastcgi_finish_request();
     }
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:10,代码来源:WebResponse.class.php

示例9: add

 /**
  * @return ProjectionChain
  **/
 public function add(ObjectProjection $projection, $name = null)
 {
     if ($name) {
         Assert::isFalse(isset($this->list[$name]));
         $this->list[$name] = $projection;
     } else {
         $this->list[] = $projection;
     }
     return $this;
 }
开发者ID:rero26,项目名称:onphp-framework,代码行数:13,代码来源:ProjectionChain.class.php

示例10: toHtml

 function toHtml(array $htmlAttributes = array())
 {
     Assert::isFalse(isset($htmlAttributes['name']));
     Assert::isFalse(isset($htmlAttributes['type']));
     Assert::isFalse(isset($htmlAttributes['value']));
     $htmlAttributes['name'] = $this->getName();
     $htmlAttributes['type'] = $this->getType();
     $htmlAttributes['value'] = $this->getValue();
     return HtmlUtil::getNode('input', $htmlAttributes);
 }
开发者ID:phoebus,项目名称:HTML_FormAbstraction,代码行数:10,代码来源:InputFormControl.class.php

示例11: run

 /**
  * @throws BaseException
  * @return ModelAndView
  **/
 public function run(Prototyped $subject, Form $form, HttpRequest $request)
 {
     Assert::isFalse($this->running, 'command already running');
     Assert::isTrue($subject instanceof DAOConnected);
     $this->transaction = InnerTransaction::begin($subject->dao());
     try {
         $mav = $this->command->run($subject, $form, $request);
         $this->running = true;
         return $mav;
     } catch (BaseException $e) {
         $this->transaction->rollback();
         throw $e;
     }
     Assert::isUnreachable();
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:19,代码来源:CarefulDatabaseRunner.class.php

示例12: getControls

 /**
  * Gets the inner controls
  * @return IFormControl[]
  */
 function getControls()
 {
     $yield = array();
     if ($this->isImported()) {
         foreach ($this->getImportedValue() as $value) {
             $control = $this->spawnControl();
             $control->importValue($value);
             Assert::isFalse($control->hasError(), 'cannot import value `%s` into %s: caused error `%s` %s', $value, get_class($control), (string) $control->getError(), $control->getErrorMessage());
             $yield[] = $control;
         }
     } else {
         foreach ($this->getDefaultValue() as $value) {
             $control = $this->spawnControl();
             $control->setDefaultValue($value);
             $yield[] = $control;
         }
     }
     return $yield;
 }
开发者ID:phoebus,项目名称:HTML_FormAbstraction,代码行数:23,代码来源:InputFormControlSet.class.php

示例13: setEncoding

 function setEncoding($encoding)
 {
     parent::setEncoding($encoding);
     if ($this->isConnected()) {
         $result = pg_set_client_encoding($this->link, $encoding);
         Assert::isFalse($result == -1, 'invalid encoding `%s` is specified', $encoding);
     }
     return $this;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:9,代码来源:PgSqlDB.class.php

示例14: prependRoute

 /**
  * Prepends the Route to the chain
  *
  * @param string $name name of the Route to append
  * @param Route $route route object to append
  *
  * @return ChainedRouter itself
  */
 function prependRoute($name, Route $route)
 {
     Assert::isScalar($name);
     Assert::isFalse(isset($this->routes[$name]), 'route `%s` already defined', $name);
     $this->routes[$name] = $route;
     array_unshift($this->chain, $route);
     return $this;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:16,代码来源:ChainedRouter.class.php

示例15: dropAll

 function dropAll()
 {
     Assert::isFalse($this->isReadonly(), 'cannot drop readonly collections');
     $query = EntityQuery::create($this->mtm->getProxy())->where(Expression::eq($this->mtm->getContainerProxyProperty(), $this->getParentObject()));
     $count = $query->delete();
     $this->clean();
     return $count;
 }
开发者ID:phoebius,项目名称:phoebius,代码行数:8,代码来源:ManyToManyContainer.class.php


注:本文中的Assert::isFalse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。