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


PHP String::isEmpty方法代码示例

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


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

示例1: setTitle

 /**
  * Sets the title of this content
  * @param string $title
  * @return null
  * @throws zibo\ZiboException when the title is empty
  */
 private function setTitle($title)
 {
     if (String::isEmpty($title)) {
         throw new ZiboException('Provided title is empty');
     }
     $this->title = $title;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:Content.php

示例2: setFormat

 /**
  * Sets the format string
  * @param string $format
  * @return null
  * @throws zibo\ZiboException when the provided format is empty or not a string
  */
 protected function setFormat($format)
 {
     if (String::isEmpty($format)) {
         throw new ZiboException('Provided format is empty');
     }
     $this->format = $format;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:DataFormat.php

示例3: setTitle

 public function setTitle($title)
 {
     if (!$title instanceof Exception && String::isEmpty($title)) {
         throw new ZiboException('Empty title provided');
     }
     $this->title = $title;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:7,代码来源:LogItem.php

示例4: setName

 /**
  * Sets the name of the queue
  * @param string $name The name of the queue
  * @return null
  */
 protected function setName($name)
 {
     if (String::isEmpty($name)) {
         throw new ZiboException('Could not set the name of the queue worker: provided name is empty');
     }
     $this->name = $name;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:12,代码来源:QueueWorker.php

示例5: setName

 /**
  * Set the name of the validator
  * @param string $name
  * @return null
  * @throws zibo\ZiboException when $name is not a string
  * @throws zibo\library\orm\exception\ModelException when $name is empty
  */
 private function setName($name)
 {
     if (String::isEmpty($name)) {
         throw new OrmException('Name is empty');
     }
     $this->name = $name;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:14,代码来源:FieldValidator.php

示例6: setRelationOrder

 /**
  * Sets the order statement string for the relation
  * @param string $order
  * @return null
  */
 public function setRelationOrder($order)
 {
     if ($order !== null && String::isEmpty($order)) {
         throw new OrmException('Provided order statement is empty');
     }
     $this->relationOrder = $order;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:12,代码来源:HasManyField.php

示例7: setName

 /**
  * Sets the name of the namespace
  * @param string $name
  * @return null
  * @throws zibo\ZiboException when the provided name is empty or invalid
  */
 private function setName($name)
 {
     if (String::isEmpty($name)) {
         throw new ZiboException('Provided name is empty');
     }
     $this->name = $name;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:ModuleNamespace.php

示例8: register

 /**
  * Register an ImageIO to this factory
  * @param string extension extension of the images the IO will handle
  * @param ImageIO ImageIO for this extension
  */
 public function register($extension, ImageIO $io)
 {
     if (String::isEmpty($extension)) {
         throw new ImageException('extension is empty');
     }
     $this->io[$extension] = $io;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:12,代码来源:ImageFactory.php

示例9: setLabel

 /**
  * Sets the label for this field
  * @param string $label Translation key for the name of this field
  * @return null
  */
 public function setLabel($label)
 {
     if ($label !== null && String::isEmpty($label)) {
         throw new OrmException('Provided label is empty');
     }
     $this->label = $label;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:12,代码来源:ModelField.php

示例10: setChangeKey

 /**
  * Sets the change key
  * @param string $changeKey
  * @return null
  * @throws InvalidArgumentException when the changeKey is empty
  */
 public function setChangeKey($changeKey)
 {
     if ($changeKey !== null && String::isEmpty($changeKey)) {
         throw new InvalidArgumentException('Provided change key is empty');
     }
     $this->ChangeKey = $changeKey;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:BaseId.php

示例11: addAllowedName

 public function addAllowedName($name)
 {
     if (String::isEmpty($name)) {
         throw new ZiboException('Provided name is empty');
     }
     $this->names[] = $name;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:7,代码来源:NameFilter.php

示例12: setExportUrl

 /**
  * Sets the URL to the export
  * @param string $url
  * @return null
  * @throws zibo\ZiboException when the provided URL is empty or invalid
  */
 public function setExportUrl($url)
 {
     if (String::isEmpty($url)) {
         throw new ZiboException('Provided export URL is empty or invalid');
     }
     $this->exportUrl = $url;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:ExportableTable.php

示例13: hasModel

 /**
  * Gets whether this register has a model by the provided name
  * @param string $modelName Name of the model
  * @return boolean True if the register has the provided model registered, false otherwise
  * @throws zibo\library\orm\exception\OrmException when the provided model name is empty
  */
 public function hasModel($modelName)
 {
     if (String::isEmpty($modelName)) {
         throw new OrmException('Provided modelname is empty');
     }
     return array_key_exists($modelName, $this->models);
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:ModelRegister.php

示例14: registerService

 /**
  * Registers a service to this server instance
  * @param string $name The name of the service
  * @param string|array|zibo\library\Callback $callback The callback with the logic of the service
  * @param string $returnType The type of the resulting value
  * @param array $parameterTypes The types of parameters for this service
  * @param string $description A description of this service
  * @return null
  * @throws zibo\library\xmlrpc\exception\XmlRpcException when the name of the service is empty
  * @throws zibo\library\xmlrpc\exception\XmlRpcException when the name of the service is already used by another service
  * @throws zibo\library\xmlrpc\exception\XmlRpcException when a invalid return type or parameter type has been detected
  * @throws zibo\library\xmlrpc\exception\XmlRpcException when the description is not a valid string
  */
 public function registerService($name, $callback, $returnType = 'string', $parameterTypes = null, $description = null)
 {
     if (String::isEmpty($name)) {
         throw new XmlRpcException('Name of the service is empty');
     }
     if (isset($this->services[$name])) {
         throw new XmlRpcException($name . ' service already registered');
     }
     $callback = new Callback($callback);
     if (!Value::isValidType($returnType)) {
         throw new XmlRpcException('Return type ' . $returnType . ' is not a valid type');
     }
     if ($parameterTypes == null) {
         $parameterTypes = array();
     } elseif (!is_array($parameterTypes)) {
         $parameterTypes = array($parameterTypes);
     }
     foreach ($parameterTypes as $type) {
         if (!Value::isValidType($type)) {
             throw new XmlRpcException('Parameter type ' . $type . ' is not a valid type');
         }
     }
     if ($description != null && !is_string($description)) {
         throw new XmlRpcException('Provided description is not a string');
     }
     $service = array(self::SERVICE_CALLBACK => $callback, self::SERVICE_RETURN_TYPE => $returnType, self::SERVICE_PARAMETERS_TYPES => $parameterTypes, self::SERVICE_DESCRIPTION => $description);
     $this->services[$name] = $service;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:41,代码来源:Server.php

示例15: setName

 /**
  * Set the name of this theme
  * @param string $name
  * @return null
  * @throws zibo\ZiboException when the provided name is invalid
  */
 private function setName($name)
 {
     if (String::isEmpty($name)) {
         throw new ZiboException('Name of the region is empty');
     }
     $this->name = $name;
 }
开发者ID:BGCX261,项目名称:zibo-svn-to-git,代码行数:13,代码来源:Region.php


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