Подсказка по стандартным классам PHP

Полезные базы данных: города, страны, ZIP-коды и т.д.
Ответить
mrix
Сообщения: 125
Зарегистрирован: 2010.08.30, 11:48
Откуда: Россия, Новосибирск

Подсказка по стандартным классам PHP

Сообщение mrix »

Я пользуюсь редактором phpDesigner. Очень хорошая IDE, но не знает некоторых стандартных классов (например, Reflection, Mongo, ...).
Поэтому сделал вот такие описания стандартных классов. Подключаю как библиотеки и получаю хорошие подсказки. В состав входят:

Код: Выделить всё

\datetime
   * DateTime
   * DateTimeZone

\exceptions
   * ErrorException
   * Exception

\interfaces
   * ArrayAccess
   * Iterator
   * IteratorAggregate
   * Serializable
   * Traversable

\memcache
   * Memcache

\mongo\core
   * Mongo
   * MongoCollection
   * MongoCursor
   * MongoDB
\mongo\gridfs
   * MongoGridFS
   * MongoGridFSCursor
   * MongoGridFSFile
\mongo\types
   * MongoBinData
   * MongoCode
   * MongoDate
   * MongoDBRef
   * MongoId
   * MongoInt32
   * MongoInt64
   * MongoMaxKey
   * MongoMinKey
   * MongoRegex
   * MongoTimestamp

\mysqli
   * mysqli
   * mysqli_driver
   * mysqli_result
   * mysqli_stmt
   * mysqli_warning

\pdo
   * PDO
   * PDOException
   * PDORow
   * PDOStatement

\reflection
   * Reflection
   * ReflectionClass
   * ReflectionExtension
   * ReflectionFunction
   * ReflectionFunctionAbstract
   * ReflectionMethod
   * ReflectionObject
   * ReflectionParameter
   * ReflectionProperty
   * Reflector

\spl\datastructures
   * SplObjectStorage
\spl\exceptions
   * BadFunctionCallException
   * BadMethodCallException
   * DomainException
   * InvalidArgumentException
   * LengthException
   * LogicException
   * OutOfBoundsException
   * OutOfRangeException
   * OverflowException
   * RangeException
   * RuntimeException
   * UnderflowException
   * UnexpectedValueException
\spl\file
   * SplFileInfo
   * SplFileObject
   * SplTempFileObject
\spl\interfaces
   * Countable
   * OuterIterator
   * RecursiveIterator
   * SeekableIterator
\spl\iterators
   * AppendIterator
   * ArrayIterator
   * CachingIterator
   * DirectoryIterator
   * EmptyIterator
   * FilterIterator
   * InfiniteIterator
   * IteratorIterator
   * LimitIterator
   * NoRewindIterator
   * ParentIterator
   * RecursiveArrayIterator
   * RecursiveCachingIterator
   * RecursiveDirectoryIterator
   * RecursiveFilterIterator
   * RecursiveIteratorIterator
   * RecursiveRegexIterator
   * RegexIterator
   * SimpleXMLIterator
\spl\miscellaneous
   * ArrayObject
   * SplObserver
   * SplSubject

\tidy
   * tidy
   * tidyNode

\xml\dom
   * DOMAttr
   * DOMCharacterData
   * DOMComment
   * DOMDocument
   * DOMDocumentFragment
   * DOMDocumentType
   * DOMElement
   * DOMEntity
   * DOMEntityReference
   * DOMException
   * DOMImplementation
   * DOMNamedNodeMap
   * DOMNode
   * DOMNodeList
   * DOMNotation
   * DOMProcessingInstruction
   * DOMText
   * DOMXPath
\xml
   * LibXMLError
   * XMLReader
\xml\simplexml
   * SimpleXMLElement
\xml\xsl
   * XSLTProcessor
Могут быть небольшие неточности. Выдирал с сайта автоматически.
Может быть, кому-то будет полезно.

Дальше примеры
Вложения
coreclasses.zip
Архив с классами
(145.36 КБ) 424 скачивания
Последний раз редактировалось mrix 2011.03.24, 18:20, всего редактировалось 2 раза.
mrix
Сообщения: 125
Зарегистрирован: 2010.08.30, 11:48
Откуда: Россия, Новосибирск

Re: Подсказка по стандартным классам PHP

Сообщение mrix »

ReflectionClass:

Код: Выделить всё

<?php

/**
 * The ReflectionClass Class
 * 
 * The ReflectionClass class reports
 * information about a class.
 * 
 * @see http://www.php.net/manual/en/class.reflectionclass.php
 */
class ReflectionClass implements Reflector
{
	/**
	 * Is Implicit Abstract
	 */
	const IS_IMPLICIT_ABSTRACT = 16;
	/**
	 * Is Explicit Abstract
	 */
	const IS_EXPLICIT_ABSTRACT = 32;
	/**
	 * Is Final
	 */
	const IS_FINAL = 64;

	/**
	 * @var string Prop description
	 */
	public $name = '';

	/**
	 * Clones object
	 * 
	 * Clones.
	 * 
	 * @return void No value is returned.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.clone.php
	 */
	final private function __clone() {}

	/**
	 * Exports a class
	 * 
	 * Exports a reflected class.
	 * 
	 * @param mixed $argument The reflection to export.
	 * @param boolean $return Setting to TRUE will return the export, as opposed to emitting it. Setting to FALSE (the default) will do the opposite.
	 * 
	 * @return string If the return parameter is set to TRUE, then the export is returned as a string, otherwise NULL is returned.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.export.php
	 */
	public static function export($argument, $return = false) {}

	/**
	 * Constructs a ReflectionClass
	 * 
	 * Constructs a new {@link ReflectionClass} object.
	 * 
	 * @param mixed $argument Either a string containing the name of the class to reflect, or an object.
	 * 
	 * @return mixed No value is returned.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.construct.php
	 */
	public function __construct($argument) {}

	/**
	 * Returns the string representation of the ReflectionClass object.
	 * 
	 * Returns the string representation of the ReflectionClass object.
	 * 
	 * @return string A string representation of this ReflectionClass instance.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.tostring.php
	 */
	public function __toString() {}

	/**
	 * Gets class name
	 * 
	 * Gets the class name.
	 * 
	 * @return string The class name.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getname.php
	 */
	public function getName() {}

	/**
	 * Checks if internal
	 * 
	 * Checks whether the class is internal, as opposed to user-defined.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isinternal.php
	 */
	public function isInternal() {}

	/**
	 * Checks if user defined
	 * 
	 * Checks whether the class is user-defined, as opposed to internal.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isuserdefined.php
	 */
	public function isUserDefined() {}

	/**
	 * Checks if instantiable
	 * 
	 * Checks if the class is instanciable.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isinstantiable.php
	 */
	public function isInstantiable() {}

	/**
	 * Gets the filename of the file in which the class has been defined
	 * 
	 * Gets the filename of the file in which the class has been defined.
	 * 
	 * @return string Returns the filename of the file in which the class has been defined. If the class is defined in the PHP core or in a PHP extension, FALSE is returned.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getfilename.php
	 */
	public function getFileName() {}

	/**
	 * Gets starting line number
	 * 
	 * Get the starting line number.
	 * 
	 * @return integer The starting line number, as an integer.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getstartline.php
	 */
	public function getStartLine() {}

	/**
	 * Gets end line
	 * 
	 * Gets end line number from a user-defined class definition.
	 * 
	 * @return integer The ending line number of the user defined class, or FALSE if unknown.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getendline.php
	 */
	public function getEndLine() {}

	/**
	 * Gets doc comments
	 * 
	 * Gets doc comments from a class.
	 * 
	 * @return string The doc comment if it exists, otherwise FALSE
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getdoccomment.php
	 */
	public function getDocComment() {}

	/**
	 * Gets constructor
	 * 
	 * Gets the constructor from a class.
	 * 
	 * @return object A ReflectionMethod object.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getconstructor.php
	 */
	public function getConstructor() {}

	/**
	 * Checks if method is defined
	 * 
	 * Checks whether a specific method is defined in a class.
	 * 
	 * @param string $name Name of the method being checked for.
	 * 
	 * @return boolean TRUE if it has the method, otherwise FALSE
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.hasmethod.php
	 */
	public function hasMethod($name) {}

	/**
	 * Gets a ReflectionMethod
	 * 
	 * Gets a {@link ReflectionMethod} about a method.
	 * 
	 * @param string $name The method name to reflect.
	 * 
	 * @return object A ReflectionMethod.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getmethod.php
	 */
	public function getMethod($name) {}

	/**
	 * Gets a list of methods
	 * 
	 * Gets a list of methods.
	 * 
	 * @param string $filter Any combination of ReflectionMethod::IS_STATIC, ReflectionMethod::IS_PUBLIC, ReflectionMethod::IS_PROTECTED, ReflectionMethod::IS_PRIVATE, ReflectionMethod::IS_ABSTRACT, ReflectionMethod::IS_FINAL.
	 * 
	 * @return array An array of methods.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getmethods.php
	 */
	public function getMethods($filter = null) {}

	/**
	 * Checks if property is defined
	 * 
	 * Checks whether the specified property is defined.
	 * 
	 * @param string $name Name of the property being checked for.
	 * 
	 * @return boolean TRUE if it has the property, otherwise FALSE
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.hasproperty.php
	 */
	public function hasProperty($name) {}

	/**
	 * Gets property
	 * 
	 * Gets a property.
	 * 
	 * @param string $name The property name.
	 * 
	 * @return ReflectionProperty A ReflectionProperty.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getproperty.php
	 */
	public function getProperty($name) {}

	/**
	 * Gets properties
	 * 
	 * Retrieves reflected properties.
	 * 
	 * @param integer $filter The optional filter, for filtering desired property types. It's configured using the ReflectionProperty constants, and defaults to all property types.
	 * 
	 * @return array An array of ReflectionProperty objects.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getproperties.php
	 */
	public function getProperties($filter = null) {}

	/**
	 * Checks if constant is defined
	 * 
	 * Checks whether the class has a specific constant defined or not.
	 * 
	 * @param string $name The name of the constant being checked for.
	 * 
	 * @return boolean TRUE if the constant is defined, otherwise FALSE.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.hasconstant.php
	 */
	public function hasConstant($name) {}

	/**
	 * Gets constants
	 * 
	 * Gets defined constants from a class.
	 * 
	 * @return array An array of constants.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getconstants.php
	 */
	public function getConstants() {}

	/**
	 * Gets defined constants
	 * 
	 * Gets the defined constants.
	 * 
	 * @param string $name 
	 * 
	 * @return mixed 
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getconstant.php
	 */
	public function getConstant($name) {}

	/**
	 * Gets the interfaces
	 * 
	 * Gets the interfaces.
	 * 
	 * @return array An associative array of interfaces, with keys as interface names and the array values as ReflectionClass objects.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getinterfaces.php
	 */
	public function getInterfaces() {}

	/**
	 * Gets the interface names
	 * 
	 * Get the interface names.
	 * 
	 * @return array A numerical array with interface names as the values.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getinterfacenames.php
	 */
	public function getInterfaceNames() {}

	/**
	 * Checks if interface
	 * 
	 * Checks whether the class is an interface.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isinterface.php
	 */
	public function isInterface() {}

	/**
	 * Checks if class is abstract
	 * 
	 * Checks if the class is abstract.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isabstract.php
	 */
	public function isAbstract() {}

	/**
	 * Checks if class is final
	 * 
	 * Checks if a class is final.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isfinal.php
	 */
	public function isFinal() {}

	/**
	 * Gets modifiers
	 * 
	 * @return integer 
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getmodifiers.php
	 */
	public function getModifiers() {}

	/**
	 * Checks class for instance
	 * 
	 * Checks if an object is an instance of a class.
	 * 
	 * @param object $object The object being compared to.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isinstance.php
	 */
	public function isInstance($object) {}

	/**
	 * Creates a new cass instance from given arguments.
	 * 
	 * Creates a new instance of the class. The given arguments are passed to the
	 * class constructor.
	 * 
	 * @param mixed $args Accepts a variable number of arguments which are passed to the class constructor, much like call_user_func().
	 * 
	 * @return object 
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.newinstance.php
	 */
	public function newInstance($args) {}

	/**
	 * Creates a new cass instance from given arguments.
	 * 
	 * Creates a new cass instance of the class, the given arguments are passed
	 * to the class constructor.
	 * 
	 * @param array $args The parameters to be passed to the class constructor as an array.
	 * 
	 * @return object Returns a new instance of the class.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.newinstanceargs.php
	 */
	public function newInstanceArgs($args = null) {}

	/**
	 * Gets parent class
	 * 
	 * @return object A ReflectionClass.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getparentclass.php
	 */
	public function getParentClass() {}

	/**
	 * Checks if a subclass
	 * 
	 * Checks if the class is a subclass of a specified class.
	 * 
	 * @param string $class The class name being checked against.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.issubclassof.php
	 */
	public function isSubclassOf($class) {}

	/**
	 * Gets static properties
	 * 
	 * Get the static properties.
	 * 
	 * @return array The static properties, as an array.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getstaticproperties.php
	 */
	public function getStaticProperties() {}

	/**
	 * Gets static property value
	 * 
	 * Gets the static property values.
	 * 
	 * @param string $name 
	 * @param string $default 
	 * 
	 * @return mixed 
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getstaticpropertyvalue.php
	 */
	public function getStaticPropertyValue($name, $default = null) {}

	/**
	 * Sets static property value
	 * 
	 * Sets static property value.
	 * 
	 * @param string $name Property name.
	 * @param string $value New property value.
	 * 
	 * @return void No value is returned.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.setstaticpropertyvalue.php
	 */
	public function setStaticPropertyValue($name, $value) {}

	/**
	 * Gets default properties
	 * 
	 * Gets default properties from a class.
	 * 
	 * @return array An array of default properties.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getdefaultproperties.php
	 */
	public function getDefaultProperties() {}

	/**
	 * Checks if iterateable
	 * 
	 * Checks whether the class is iterateable.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.isiterateable.php
	 */
	public function isIterateable() {}

	/**
	 * Implements interface
	 * 
	 * Checks whether it implements an interface.
	 * 
	 * @param string $interface The interface name.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.implementsinterface.php
	 */
	public function implementsInterface($interface) {}

	/**
	 * Gets extension info
	 * 
	 * Gets an extensions {@link ReflectionExtension} object.
	 * 
	 * @return ReflectionExtension A ReflectionExtension object.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getextension.php
	 */
	public function getExtension() {}

	/**
	 * Gets an extensions name
	 * 
	 * Gets an extensions name.
	 * 
	 * @return string The extensions name.
	 * 
	 * @see http://www.php.net/manual/en/reflectionclass.getextensionname.php
	 */
	public function getExtensionName() {}


}
mrix
Сообщения: 125
Зарегистрирован: 2010.08.30, 11:48
Откуда: Россия, Новосибирск

Re: Подсказка по стандартным классам PHP

Сообщение mrix »

MongoCursor

Код: Выделить всё

<?php

/**
 * The MongoCursor Class
 * 
 * Result object for database query.
 * 
 * A MongoCursor has two "life stages": pre- and post-
 * query. A cursor can be created manually by calling the constructor, but it
 * is most often created by calling {@link MongoCollection::find()}.
 * When a cursor is created, it has not yet contacted the database, so it is in
 * its pre-query state.  In this state, the client can further specify what
 * they want the query to do, including adding limits, skips, sorts, and more
 * advanced options.
 * 
 * When the client attempts to get a result (by calling
 * {@link MongoCursor::next()}, directly or indirectly), the cursor
 * moves into the post-query stage.  At this point, the query has been executed
 * by the database and cannot be modified anymore.
 * 
 * <code>
 * <?php
 * $cursor = $collection->find()->limit(10);
 * // database has not yet been queried, so more search options can be added
 * $cursor = $cursor->sort(array("a" => 1));
 * var_dump($cursor->getNext());
 * // now database has been queried and more options cannot be added
 * // so this will throw an exception:
 * $cursor->skip(4);
 * ?>
 * </code>
 * 
 * @see http://www.php.net/manual/en/class.mongocursor.php
 */
class MongoCursor implements Iterator, Traversable
{

	/**
	 * @var boolean If the query should have the "slaveOkay" flag set, which allows reads on the slave (slaves are, by default, just for backup and unreadable). Can be overridden with MongoCursor::slaveOkay().
	 */
	public static $slaveOkay = false;
	/**
	 * @var integer Set timeout in milliseconds for all database responses. To wait forever, use -1. Can be overridden with MongoCursor::timeout(). This does not cause the MongoDB server to cancel the operation, it just causes the driver to stop waiting for a response and throw a MongoCursorTimeoutException.
	 */
	public static $timeout = 30000;

	/**
	 * Create a new cursor
	 * 
	 * @param Mongo $connection Database connection.
	 * @param string $ns Full name of database and collection.
	 * @param array $query Database query.
	 * @param array $fields Fields to return.
	 * 
	 * @return void Returns the new cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.construct.php
	 */
	public function __construct($connection, $ns, $query = array(), $fields = array()) {}

	/**
	 * Checks if there are any more elements in this cursor
	 * 
	 * @return boolean Returns if there is another element.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.hasnext.php
	 */
	public function hasNext() {}

	/**
	 * Return the next object to which this cursor points, and advance the cursor
	 * 
	 * This is identical to the function:
	 * <code>
	 * <?php
	 * public function getNext() {
	 *     $this->next();
	 *     return $this->current();
	 * }
	 * ?>
	 * </code>
	 * 
	 * @return array Returns the next object.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.getnext.php
	 */
	public function getNext() {}

	/**
	 * Limits the number of results returned
	 * 
	 * @param integer $num The number of results to return.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.limit.php
	 */
	public function limit($num) {}

	/**
	 * Sets the number of results returned per result set
	 * 
	 * This cannot override MongoDB's limit on the amount of data it will return to
	 * the client (i.e., if you set batch size to 1,000,000,000, MongoDB will still
	 * only return 4-16MB of results).
	 * To ensure consistent behavior, the rules of batchSize and limit behavior a
	 * little complex but work "as expected". The rules are: hard limits override
	 * soft limits with preference given to {@link MongoCursor::limit()}
	 * over {@link MongoCursor::batchSize()}. After that, whichever is
	 * set and lower than the other will take precedence.  Some examples:
	 * <code>
	 * <?php
	 * // one batch, at most 20 items
	 * $cursor->limit(-20)->batchSize(10);
	 * // one batch, at most 10 items
	 * $cursor->limit(20)->batchSize(-10);
	 * // first batch: at most 10 items
	 * $cursor->limit(10);
	 * // first batch: at most 10 items
	 * $cursor->limit(10)->batchSize(20);
	 * // first batch: at most 10 items
	 * $cursor->limit(20)->batchSize(10);
	 * $cursor->limit(30)->batchSize(7)
	 * // if we iterate through 28 items, the next call to getNext() will contact the 
	 * // database and request a batch of 2 documents
	 * ?>
	 * </code>
	 * 
	 * @param integer $num The number of results to return in the next batch.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.batchsize.php
	 */
	public function batchSize($num) {}

	/**
	 * Skips a number of results
	 * 
	 * @param integer $num The number of results to skip.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.skip.php
	 */
	public function skip($num) {}

	/**
	 * Sets the fields for a query
	 * 
	 * Fields are specified by "fieldname" : bool.  TRUE
	 * indicates that a field should be returned, FALSE indicates that it should
	 * not be returned.  You can also use 1 and 0 instead of TRUE and FALSE.
	 * 
	 * Thus, to return only the "summary" field, one could say:
	 * <code>
	 * <?php
	 * $cursor->fields(array("summary" => true));
	 * ?>
	 * </code>
	 * 
	 * To return all fields except the "hidden" field:
	 * <code>
	 * <?php
	 * $cursor->fields(array("hidden" => false));
	 * ?>
	 * </code>
	 * 
	 * @param array $f Fields to return (or not return).
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.fields.php
	 */
	public function fields($f) {}

	/**
	 * Sets whether this query can be done on a slave
	 * 
	 * Calling this will make the driver route reads to slaves if:
	 * 		You are using a replica set and
	 * 		You created a {@link Mongo} instance using the option "replicaSet" => true and
	 * 		There is a healthy slave that can be reached by the driver.
	 * 
	 * You can check which server was used for this query by calling
	 * {@link MongoCursor::info()} after running the query. It's
	 * server field will show which server the query was sent to.
	 * Note that you should use this function even if you do not use the automatic
	 * routing to slaves.  If you connect directly to a secondary in a replica set,
	 * you still need to call this function, which basically tells the database that
	 * you are aware that you might be getting older data and you're okay with that.
	 * If you do not call this, you'll get "not master" errors when you try to
	 * query.
	 * This method will override the static class variable
	 * MongoCursor::slaveOkay. It will also override
	 * {@link Mongo::setSlaveOkay()}, {@link MongoDB::setSlaveOkay()}
	 * and {@link MongoCollection::setSlaveOkay()}.
	 * 
	 * @param boolean $okay If it is okay to query the slave.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.slaveokay.php
	 */
	public function slaveOkay($okay = true) {}

	/**
	 * Sets whether this cursor will be left open after fetching the last results
	 * 
	 * Mongo has a feature known as tailable cursors which are similar to the Unix
	 * "tail -f" command.
	 * Tailable means cursor is not closed when the last data is retrieved.  Rather,
	 * the cursor marks the final object's position.  you can resume using the
	 * cursor later, from where it was located, if more data were received.
	 * Like any "latent cursor", the cursor may become invalid at some point -- for
	 * example if that final object it references were deleted.  Thus, you should be
	 * prepared to requery if the cursor is {@link MongoCursor::dead()}.
	 * 
	 * @param boolean $tail If the cursor should be tailable.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.tailable.php
	 */
	public function tailable($tail = true) {}

	/**
	 * Sets whether this cursor will timeout
	 * 
	 * After remaining idle for some amount of time, cursor, by default, "die."
	 * This is generally the behavior one wants. The database cleans up a cursor
	 * once all of its results have been sent to the client, but if the client
	 * doesn't request all of the results, the cursor will languish there, taking up
	 * resources. Thus, after a few minutes, the cursor "times out" and the
	 * database assumes the client has gotten everything it needs and cleans up its
	 * the cursor's resources.
	 * If, for some reason, you need a cursor to hang around for a long time, you
	 * can prevent the database from cleaning it up by using this method.  However,
	 * if you make a cursor immortal, you need to iterate through all of its results
	 * (or at least until Cursor::dead() returns TRUE) or the
	 * cursor will hang around the database forever, taking up resources.
	 * 
	 * @param boolean $liveForever If the cursor should be immortal.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.immortal.php
	 */
	public function immortal($liveForever = true) {}

	/**
	 * Sets a client-side timeout for this query
	 * 
	 * A timeout can be set at any time and will affect subsequent queries on the
	 * cursor, including fetching more results from the database.  For example, to
	 * wait forever for an initial response but timeout after 100 ms for subsequent
	 * results, one could say:
	 * <code>
	 * <?php
	 * $cursor = $collection->find();
	 * // $cursor->hasNext() executes the query.  No timeout has been set, so the 
	 * // program will wait as long as necessary for a response.
	 * while ($cursor->hasNext()) {
	 *     $cursor->timeout(100);
	 *     // now the timeout has been set, so if the cursor needs to get more results
	 *     // from the database, it will only wait 100 ms for the database's reply
	 *     try {
	 *         print_r($cursor->getNext());
	 *     }
	 *     catch(MongoCursorTimeoutException $e) {
	 *         echo "query took too long!";
	 *     }
	 * }
	 * ?>
	 * </code>
	 * A timeout of 0 (or a negative number) will wait forever so it can be used to
	 * reset the cursor if a timeout is no longer needed.
	 * 
	 * @param integer $ms The number of milliseconds for the cursor to wait for a response. By default, the cursor will wait forever.
	 * 
	 * @return MongoCursor This cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.timeout.php
	 */
	public function timeout($ms) {}

	/**
	 * Checks if there are documents that have not been sent yet from the database for this cursor
	 * 
	 * The database sends responses in batches of documents, up to 4Mb of documents
	 * per response. This method checks if the database has more batches or if the
	 * result set has been exhausted.
	 * A cursor being "dead" does not mean that
	 * {@link MongoCursor::hasNext()} will return FALSE, it only means
	 * that the database is done sending results to the client. The client should
	 * continue iterating through results until
	 * {@link MongoCursor::hasNext()} is FALSE.
	 * 
	 * @return boolean Returns if there are more results that have not been sent to the client, yet.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.dead.php
	 */
	public function dead() {}

	/**
	 * Use snapshot mode for the query
	 * 
	 * Use snapshot mode for the query.  Snapshot mode assures no duplicates are returned,
	 * or objects missed, which were present at both the start and end of the query's
	 * execution (if an object is new during the query, or deleted during the query, it
	 * may or may not be returned, even with snapshot mode).
	 * Note that short query responses (less than 1MB) are always effectively snapshotted.
	 * Currently, snapshot mode may not be used with sorting or explicit hints.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.snapshot.php
	 */
	public function snapshot() {}

	/**
	 * Sorts the results by given fields
	 * 
	 * @param array $fields The fields by which to sort.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.sort.php
	 */
	public function sort($fields) {}

	/**
	 * Gives the database a hint about the query
	 * 
	 * @param array $key_pattern Indexes to use for the query.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.hint.php
	 */
	public function hint($key_pattern) {}

	/**
	 * Adds a top-level key/value pair to a query
	 * 
	 * This is an advanced function and should not be used unless you know what
	 * you're doing.
	 * A query can optionally be nested in a "query" field if other options, such as
	 * a sort or hint, are given.  For instance, adding a sort causes the query
	 * to become a subfield of a bigger query object, like:
	 * <code>
	 * <?php
	 * $query = array("query" => $query, "orderby" => $sort);
	 * ?>
	 * </code>
	 * This method is for adding a top-level field to a query.  It makes the query a
	 * subobject (if it isn't already) and adds the key/value pair of your chosing
	 * to the top level.
	 * 
	 * @param string $key Fieldname to add.
	 * @param mixed $value Value to add.
	 * 
	 * @return MongoCursor Returns this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.addoption.php
	 */
	public function addOption($key, $value) {}

	/**
	 * Execute the query.
	 * 
	 * @return void NULL.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.doquery.php
	 */
	protected function doQuery() {}

	/**
	 * Returns the current element
	 * 
	 * This returns NULL until {@link MongoCursor::next()} is called.
	 * 
	 * @return array The current result as an associative array.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.current.php
	 */
	public function current() {}

	/**
	 * Returns the current result's _id
	 * 
	 * @return string The current result's _id as a string.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.key.php
	 */
	public function key() {}

	/**
	 * Advances the cursor to the next result
	 * 
	 * @return void NULL.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.next.php
	 */
	public function next() {}

	/**
	 * Returns the cursor to the beginning of the result set
	 * 
	 * This is identical to the function:
	 * <code>
	 * <?php
	 * public function rewind() {
	 *     $this->reset();
	 *     $this->next();
	 * }
	 * ?>
	 * </code>
	 * 
	 * @return void NULL.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.rewind.php
	 */
	public function rewind() {}

	/**
	 * Checks if the cursor is reading a valid result.
	 * 
	 * @return boolean If the current result is not null.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.valid.php
	 */
	public function valid() {}

	/**
	 * Clears the cursor
	 * 
	 * @return void NULL.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.reset.php
	 */
	public function reset() {}

	/**
	 * Return an explanation of the query, often useful for optimization and debugging
	 * 
	 * @return array Returns an explanation of the query.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.explain.php
	 */
	public function explain() {}

	/**
	 * Counts the number of results for this query
	 * 
	 * This method does not affect the state of the cursor: if you haven't queried
	 * yet, you can still apply limits, skips, etc.  If you have started iterating
	 * through results, it will not move the current position of the cursor.  If you
	 * have exhasted the cursor, it will not reset it.
	 * 
	 * @param boolean $foundOnly Send cursor limit and skip information to the count function, if applicable.
	 * 
	 * @return integer The number of documents returned by this cursor's query.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.count.php
	 */
	public function count($foundOnly = false) {}

	/**
	 * Gets the query, fields, limit, and skip for this cursor
	 * 
	 * This can be called before or after the query.
	 * 
	 * @return array Returns the namespace, limit, skip, query, and fields for this cursor.
	 * 
	 * @see http://www.php.net/manual/en/mongocursor.info.php
	 */
	public function info() {}
}
mrix
Сообщения: 125
Зарегистрирован: 2010.08.30, 11:48
Откуда: Россия, Новосибирск

Re: Подсказка по стандартным классам PHP

Сообщение mrix »

tidy:

Код: Выделить всё

<?php

/**
 * The tidy Class
 * 
 * An HTML node in an HTML file, as detected by tidy.
 * 
 * @see http://www.php.net/manual/en/class.tidy.php
 */
class tidy
{
	/**
	 * @var string The last warnings and errors from TidyLib
	 */
	public $errorBuffer;
	
	/**
	 * Returns the value of the specified configuration option for the tidy document
	 * 
	 * Returns the value of the specified option for the
	 * specified tidy object.
	 * 
	 * @param string $option You will find a list with each configuration option and their types at: » http://tidy.sourceforge.net/docs/quickref.html.
	 * 
	 * @return mixed Returns the value of the specified option. The return type depends on the type of the specified one.
	 * 
	 * @see http://www.php.net/manual/en/tidy.getopt.php
	 */
	public function getOpt($option) {}

	/**
	 * Execute configured cleanup and repair operations on parsed markup
	 * 
	 * This function cleans and repairs the given tidy
	 * object.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/tidy.cleanrepair.php
	 */
	public function cleanRepair() {}

	/**
	 * Parse markup in file or URI
	 * 
	 * Parses the given file.
	 * 
	 * @param string $filename If the filename parameter is given, this function will also read that file and initialize the object with the file, acting like tidy_parse_file().
	 * @param mixed $config The config config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. For an explanation about each option, see » http://tidy.sourceforge.net/docs/quickref.html.
	 * @param string $encoding The encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis.
	 * @param boolean $use_include_path Search for the file in the include_path.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/tidy.parsefile.php
	 */
	public function parseFile($filename, $config = null, $encoding = null, $use_include_path = false) {}

	/**
	 * Parse a document stored in a string
	 * 
	 * Parses a document stored in a string.
	 * 
	 * @param string $input The data to be parsed.
	 * @param mixed $config The config config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. For an explanation about each option, visit » http://tidy.sourceforge.net/docs/quickref.html.
	 * @param string $encoding The encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis.
	 * 
	 * @return boolean Returns a new tidy instance.
	 * 
	 * @see http://www.php.net/manual/en/tidy.parsestring.php
	 */
	public function parseString($input, $config = null, $encoding = null) {}

	/**
	 * Repair a string using an optionally provided configuration file
	 * 
	 * Repairs the given string.
	 * 
	 * @param string $data The data to be repaired.
	 * @param mixed $config The config config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. Check » http://tidy.sourceforge.net/docs/quickref.html for an explanation about each option.
	 * @param string $encoding The encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis.
	 * 
	 * @return string Returns the repaired string.
	 * 
	 * @see http://www.php.net/manual/en/tidy.repairstring.php
	 */
	public function repairString($data, $config = null, $encoding = null) {}

	/**
	 * Repair a file and return it as a string
	 * 
	 * Repairs the given file and returns it as a string.
	 * 
	 * @param string $filename The file to be repaired.
	 * @param mixed $config The config config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. Check http://tidy.sourceforge.net/docs/quickref.html for an explanation about each option.
	 * @param string $encoding The encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis.
	 * @param boolean $use_include_path Search for the file in the include_path.
	 * 
	 * @return string Returns the repaired contents as a string.
	 * 
	 * @see http://www.php.net/manual/en/tidy.repairfile.php
	 */
	public function repairFile($filename, $config = null, $encoding = null, $use_include_path = false) {}

	/**
	 * Run configured diagnostics on parsed and repaired markup
	 * 
	 * Runs diagnostic tests on the given tidy object,
	 * adding some more information about the document in the error buffer.
	 * 
	 * @return boolean Returns TRUE on success or FALSE on failure.
	 * 
	 * @see http://www.php.net/manual/en/function.tidy-diagnose.php
	 */
	public function diagnose() {}

	/**
	 * Get release date (version) for Tidy library
	 * 
	 * Gets the release date of the Tidy library.
	 * 
	 * @return string Returns a string with the release date of the Tidy library.
	 * 
	 * @see http://www.php.net/manual/en/tidy.getrelease.php
	 */
	public function getRelease() {}

	/**
	 * Get current Tidy configuration
	 * 
	 * Gets the list of the configuration options in use by the given tidy
	 * object.
	 * 
	 * @return array Returns an array of configuration options.
	 * 
	 * @see http://www.php.net/manual/en/tidy.getconfig.php
	 */
	public function getConfig() {}

	/**
	 * Get status of specified document
	 * 
	 * Returns the status for the specified tidy object.
	 * 
	 * @return integer Returns 0 if no error/warning was raised, 1 for warnings or accessibility errors, or 2 for errors.
	 * 
	 * @see http://www.php.net/manual/en/tidy.getstatus.php
	 */
	public function getStatus() {}

	/**
	 * Get the Detected HTML version for the specified document
	 * 
	 * Returns the detected HTML version for the specified tidy
	 * object.
	 * 
	 * @return integer Returns the detected HTML version.
	 * 
	 * @see http://www.php.net/manual/en/tidy.gethtmlver.php
	 */
	public function getHtmlVer() {}

	/**
	 * Indicates if the document is a XHTML document
	 * 
	 * Tells if the document is a XHTML document.
	 * 
	 * @return boolean This function returns TRUE if the specified tidy object is a XHTML document, or FALSE otherwise.
	 * 
	 * @see http://www.php.net/manual/en/tidy.isxhtml.php
	 */
	public function isXhtml() {}

	/**
	 * Indicates if the document is a generic (non HTML/XHTML) XML document
	 * 
	 * Tells if the document is a generic (non HTML/XHTML) XML document.
	 * 
	 * @return boolean This function returns TRUE if the specified tidy object is a generic XML document (non HTML/XHTML), or FALSE otherwise.
	 * 
	 * @see http://www.php.net/manual/en/tidy.isxml.php
	 */
	public function isXml() {}

	/**
	 * Returns a tidyNode object representing the root of the tidy parse tree
	 * 
	 * Returns a {@link tidyNode} object representing the
	 * root of the tidy parse tree.
	 * 
	 * @return tidyNode Returns the tidyNode object.
	 * 
	 * @see http://www.php.net/manual/en/tidy.root.php
	 */
	public function root() {}

	/**
	 * Returns a tidyNode object starting from the <head> tag of the tidy parse tree
	 * 
	 * Returns a {@link tidyNode} object starting from
	 * the <head> tag of the tidy parse tree.
	 * 
	 * @return tidyNode Returns the tidyNode object.
	 * 
	 * @see http://www.php.net/manual/en/tidy.head.php
	 */
	public function head() {}

	/**
	 * Returns a tidyNode object starting from the <html> tag of the tidy parse tree
	 * 
	 * Returns a {@link tidyNode} object starting
	 * from the <html> tag of the tidy parse tree.
	 * 
	 * @return tidyNode Returns the tidyNode object.
	 * 
	 * @see http://www.php.net/manual/en/tidy.html.php
	 */
	public function html() {}

	/**
	 * Returns a tidyNode object starting from the <body> tag of the tidy parse tree
	 * 
	 * Returns a {@link tidyNode} object starting from the
	 * <body> tag of the tidy parse tree.
	 * 
	 * @return tidyNode Returns the detected HTML version.
	 * 
	 * @see http://www.php.net/manual/en/tidy.body.php
	 */
	public function body() {}

	/**
	 * Constructs a new tidy object
	 * 
	 * Constructs a new {@link tidy} object.
	 * 
	 * @param string $filename If the filename parameter is given, this function will also read that file and initialize the object with the file, acting like tidy_parse_file().
	 * @param mixed $config The config config can be passed either as an array or as a string. If a string is passed, it is interpreted as the name of the configuration file, otherwise, it is interpreted as the options themselves. For an explanation about each option, visit » http://tidy.sourceforge.net/docs/quickref.html.
	 * @param string $encoding The encoding parameter sets the encoding for input/output documents. The possible values for encoding are: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5, and shiftjis.
	 * @param boolean $use_include_path Search for the file in the include_path.
	 * 
	 * @return tidy Returns the new tidy instance.
	 * 
	 * @see http://www.php.net/manual/en/tidy.construct.php
	 */
	public function __construct($filename = null, $config = null, $encoding = null, $use_include_path = false) {}


}
Ответить