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


PHP Assert::isBoolean方法代码示例

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


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

示例1: __construct

 function __construct($title = null, $block = false)
 {
     Assert::isScalarOrNull($title);
     Assert::isBoolean($block);
     $this->title = $title;
     $this->block = $block;
 }
开发者ID:phoebius,项目名称:phoebius.com,代码行数:7,代码来源:SiteDocChapter.class.php

示例2: setPublic

 /**
  * @return DoctypeDeclaration
  **/
 public function setPublic($isPublic)
 {
     Assert::isBoolean($isPublic);
     $this->public = $isPublic;
     $this->inline = false;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:10,代码来源:DoctypeDeclaration.class.php

示例3: __construct

 /**
  * @param boolean whether to use include path or not
  * @param boolean whether to allow pre-scanning technique or not. PreScan is important for 
  * huge and distributed class locations
  */
 function __construct($useIncludePath = true, $allowPreScan = false)
 {
     Assert::isBoolean($allowPreScan);
     $this->allowPreScan = $allowPreScan;
     parent::__construct($useIncludePath);
     $this->setExtension(PHOEBIUS_TYPE_EXTENSION);
 }
开发者ID:phoebius,项目名称:phoebius,代码行数:12,代码来源:CSharpStyleClassResolver.class.php

示例4: getParameterList

 function getParameterList($requiredOnly = true)
 {
     Assert::isBoolean($requiredOnly);
     if ($requiredOnly && $this->isOptional) {
         return array();
     }
     return array($this->name);
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:8,代码来源:RequestVarImportRule.class.php

示例5: __construct

 public function __construct(Identifiable $parent, GenericDAO $dao, $lazy = true)
 {
     Assert::isBoolean($lazy);
     $this->parent = $parent;
     $this->lazy = $lazy;
     $this->dao = $dao;
     Assert::isInstance($dao->getObjectName(), 'Identifiable');
     $this->comparator = SerializedObjectComparator::me();
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:9,代码来源:UnifiedContainer.class.php

示例6: validateAgainstCustom

 /**
  * Performs validation against custom parameters (convention, and even processor).
  * Please consider, how methods with the long list of arguments are formatted.
  * @param $target object to validate
  * @param $somethingElse boolean something else argument
  * @return CodingStyleValidator itself
  */
 function validateAgainstCustom(IConvention $convention, CodingStyleProcessor $processor, $target, $somethingElse = true)
 {
     // do not forget to check custom arguments against their expected type
     Assert::isTrue(is_object($target));
     Assert::isBoolean($somethingElse);
     $this->convention = $convention;
     $this->processor = $processor->setTarget($target)->setSomethingElse($somethingElse);
     $this->runValidation();
     return $this;
 }
开发者ID:phoebius,项目名称:phoebius,代码行数:17,代码来源:CodingStyleValidator.class.php

示例7: __construct

 /**
  * @param string $filepath path to the file that should be presented in response
  * @param string $filename optional name of the file to be specified in the response
  * @param string $contentType optional content type of the file to be specified in the response
  * @param boolean $unlinkOnFinish whether to remove the file when response is finished
  */
 function __construct($filepath, $filename = null, $contentType = null, $unlinkOnFinish = false)
 {
     Assert::isTrue(is_file($filepath));
     Assert::isScalarOrNull($filename);
     Assert::isScalarOrNull($contentType);
     Assert::isBoolean($unlinkOnFinish);
     $this->filepath = $filepath;
     $this->filename = $filename ? $filename : basename($filepath);
     $this->contentType = $contentType;
     $this->unlinkOnFileFlush = $unlinkOnFinish;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:17,代码来源:FileResult.class.php

示例8: __construct

 /**
  * @param string $name name of the property
  * @param array list of database field names
  * @param OrmPropertyType property type
  * @param false property visibility
  * @param boolean whether the property unique or not
  */
 function __construct($name, array $fields, OrmPropertyType $type, OrmPropertyVisibility $visibility, AssociationMultiplicity $multiplicity, $isUnique = false, $isIdentifier = false)
 {
     Assert::isScalar($name);
     Assert::isBoolean($isUnique);
     Assert::isBoolean($isIdentifier);
     $this->name = $name;
     Assert::isTrue(sizeof($fields) == $type->getColumnCount(), 'wrong DB field count');
     $this->fields = $fields;
     $this->type = $type;
     $this->visibility = $visibility;
     $this->multiplicity = $multiplicity;
     $this->isUnique = $isUnique;
     $this->isIdentifier = $isIdentifier;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:21,代码来源:OrmProperty.class.php

示例9: setBuildArrays

 /**
  * @return RedirectView
  **/
 public function setBuildArrays($really)
 {
     Assert::isBoolean($really);
     $this->buildArrays = $really;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:9,代码来源:RedirectView.class.php

示例10: resolveClassPath

 /**
  * Resolves the file path containing the requested class. Firstly, searches withing the cache
  * provided by {@link InternalSegmentCache}, then invokes the path scanner and comparer
  * provided by a descendant class
  * @param string $classname
  * @param boolean $checkIfExists
  * @return string|null returns the absolute path to the file containing the requested class
  * 	or NULL if such file not found
  */
 private function resolveClassPath($classname, $checkIfExists, $useCacheOnly = false)
 {
     Assert::isScalar($classname);
     Assert::isBoolean($checkIfExists);
     if (isset($this->foundClasspaths[$classname])) {
         return $this->foundClasspaths[$classname];
     }
     $classpath = null;
     if ($this->isCached($classname)) {
         $classpath = $this->getCached($classname);
         if ($checkIfExists && $classpath) {
             if (!file_exists($classpath)) {
                 $this->uncache($classname);
                 $classpath = null;
             }
         }
     }
     if (!$classpath && !$useCacheOnly) {
         $classpath = $this->scanClassPaths($classname);
         if ($classpath) {
             $this->cache($classname, $classpath);
         }
     }
     if ($classpath) {
         $this->foundClasspaths[$classname] = $classpath;
     }
     return $classpath;
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:37,代码来源:ClassResolver.class.php

示例11: getSqlBooleanValue

 function getSqlBooleanValue($value)
 {
     Assert::isBoolean($value);
     return $value ? 't' : 'f';
 }
开发者ID:phoebius,项目名称:phoebius,代码行数:5,代码来源:PgSqlDialect.class.php

示例12: setOverlapped

 public function setOverlapped($overlapped = true)
 {
     Assert::isBoolean($overlapped);
     $this->overlapped = $overlapped === true;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:6,代码来源:TimeIntervalsGenerator.class.php

示例13: setNoBody

 /**
  * @param $really boolean
  * @return CurlHttpClient
  **/
 public function setNoBody($really)
 {
     Assert::isBoolean($really);
     $this->noBody = $really;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:10,代码来源:CurlHttpClient.class.php

示例14: invokeResolvers

 private function invokeResolvers($classname, $useCacheOnly)
 {
     Assert::isBoolean($useCacheOnly);
     foreach ($this->resolvers as $resolver) {
         $result = $resolver->loadClassFile($classname, $useCacheOnly);
         if ($result && ($classpath = $resolver->getClassPath($classname, true))) {
             $this->classPaths[] = $classpath;
             break;
         }
     }
     return TypeUtils::isDefined($classname);
 }
开发者ID:phoebius,项目名称:ajax-example,代码行数:12,代码来源:Autoloader.class.php

示例15: lowercaseTags

 /**
  * @return HtmlTokenizer
  **/
 public function lowercaseTags($isLowercaseTags)
 {
     Assert::isBoolean($isLowercaseTags);
     $this->lowercaseTags = $isLowercaseTags;
     return $this;
 }
开发者ID:onphp-framework,项目名称:onphp-framework,代码行数:9,代码来源:HtmlTokenizer.class.php


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