id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
229,500
gridonic/hapi
src/Harvest/Model/Range.php
Range.lastWeek
public static function lastWeek($timeZone = null, $startOfWeek = 0) { $now = null; $before = null; if ( is_null($timeZone) ) { $now = new \DateTime(); $before = new \DateTime(); } else { $now = new \DateTime( "now", new \DateTimeZone( $timeZone ) )...
php
public static function lastWeek($timeZone = null, $startOfWeek = 0) { $now = null; $before = null; if ( is_null($timeZone) ) { $now = new \DateTime(); $before = new \DateTime(); } else { $now = new \DateTime( "now", new \DateTimeZone( $timeZone ) )...
[ "public", "static", "function", "lastWeek", "(", "$", "timeZone", "=", "null", ",", "$", "startOfWeek", "=", "0", ")", "{", "$", "now", "=", "null", ";", "$", "before", "=", "null", ";", "if", "(", "is_null", "(", "$", "timeZone", ")", ")", "{", ...
return Range object set to last week <code> $range = Range::lastWeek( "EST", Range::MONDAY ); </code> @param string $timeZone User Time Zone @param int $startOfWeek Starting day of the week @return Range
[ "return", "Range", "object", "set", "to", "last", "week" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/Model/Range.php#L142-L162
229,501
gridonic/hapi
src/Harvest/Model/Range.php
Range.thisMonth
public static function thisMonth($timeZone = null) { $now = null; $before = null; if ( is_null($timeZone) ) { $now = new \DateTime(); $before = new \DateTime(); } else { $now = new \DateTime( "now", new \DateTimeZone( $timeZone ) ); $be...
php
public static function thisMonth($timeZone = null) { $now = null; $before = null; if ( is_null($timeZone) ) { $now = new \DateTime(); $before = new \DateTime(); } else { $now = new \DateTime( "now", new \DateTimeZone( $timeZone ) ); $be...
[ "public", "static", "function", "thisMonth", "(", "$", "timeZone", "=", "null", ")", "{", "$", "now", "=", "null", ";", "$", "before", "=", "null", ";", "if", "(", "is_null", "(", "$", "timeZone", ")", ")", "{", "$", "now", "=", "new", "\\", "Dat...
return Range object set to this month <code> $range = Range::thisMonth( "EST" ); </code> @param string $timeZone User Time Zone @return Range
[ "return", "Range", "object", "set", "to", "this", "month" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/Model/Range.php#L174-L191
229,502
rpnzl/arrch
src/Arrch/Arrch.php
Arrch.sort
public static function sort(array $data, $key, $order = null) { uasort($data, function ($a, $b) use ($key) { $a_val = Arrch::extractValues($a, $key); $b_val = Arrch::extractValues($b, $key); // Strings if (is_string($a_val) && is_string($b_val)) { ...
php
public static function sort(array $data, $key, $order = null) { uasort($data, function ($a, $b) use ($key) { $a_val = Arrch::extractValues($a, $key); $b_val = Arrch::extractValues($b, $key); // Strings if (is_string($a_val) && is_string($b_val)) { ...
[ "public", "static", "function", "sort", "(", "array", "$", "data", ",", "$", "key", ",", "$", "order", "=", "null", ")", "{", "uasort", "(", "$", "data", ",", "function", "(", "$", "a", ",", "$", "b", ")", "use", "(", "$", "key", ")", "{", "$...
Sorts an array of objects by the specified key. @param arr $data The array of objects or associative arrays to sort. @param str $key The object key or key path to use in sort evaluation. @param str $order ASC or DESC. @return arr The result array.
[ "Sorts", "an", "array", "of", "objects", "by", "the", "specified", "key", "." ]
994258bbefb7722243211654c4f78813312cd5ed
https://github.com/rpnzl/arrch/blob/994258bbefb7722243211654c4f78813312cd5ed/src/Arrch/Arrch.php#L84-L107
229,503
rpnzl/arrch
src/Arrch/Arrch.php
Arrch.where
public static function where(array $data, array $conditions = array()) { foreach ($conditions as $condition) { if (!is_array($condition)) { trigger_error('Condition '.var_export($condition, true).' must be an array!', E_USER_ERROR); } else { array_map(...
php
public static function where(array $data, array $conditions = array()) { foreach ($conditions as $condition) { if (!is_array($condition)) { trigger_error('Condition '.var_export($condition, true).' must be an array!', E_USER_ERROR); } else { array_map(...
[ "public", "static", "function", "where", "(", "array", "$", "data", ",", "array", "$", "conditions", "=", "array", "(", ")", ")", "{", "foreach", "(", "$", "conditions", "as", "$", "condition", ")", "{", "if", "(", "!", "is_array", "(", "$", "conditi...
Evaluates an object based on an array of conditions passed into the function, formatted like so... array('city', 'arlington'); array('city', '!=', 'arlington'); @param arr $data The array of objects or associative arrays to search. @param arr $conditions The conditions to evaluate against. @return ...
[ "Evaluates", "an", "object", "based", "on", "an", "array", "of", "conditions", "passed", "into", "the", "function", "formatted", "like", "so", "..." ]
994258bbefb7722243211654c4f78813312cd5ed
https://github.com/rpnzl/arrch/blob/994258bbefb7722243211654c4f78813312cd5ed/src/Arrch/Arrch.php#L120-L173
229,504
rpnzl/arrch
src/Arrch/Arrch.php
Arrch.extractValues
public static function extractValues($item, $key) { // Array of results $results = array(); // Cast as array if object $item = is_object($item) ? (array) $item : $item; // Array of keys $keys = strstr($key, static::$key_split) ? explode(static::$key_split, $key) : a...
php
public static function extractValues($item, $key) { // Array of results $results = array(); // Cast as array if object $item = is_object($item) ? (array) $item : $item; // Array of keys $keys = strstr($key, static::$key_split) ? explode(static::$key_split, $key) : a...
[ "public", "static", "function", "extractValues", "(", "$", "item", ",", "$", "key", ")", "{", "// Array of results", "$", "results", "=", "array", "(", ")", ";", "// Cast as array if object", "$", "item", "=", "is_object", "(", "$", "item", ")", "?", "(", ...
Finds the requested value in a multidimensional array or an object and returns it. @param mixed $item The item containing the value. @param str $key The key or key path to the desired value. @return mixed The found value or null.
[ "Finds", "the", "requested", "value", "in", "a", "multidimensional", "array", "or", "an", "object", "and", "returns", "it", "." ]
994258bbefb7722243211654c4f78813312cd5ed
https://github.com/rpnzl/arrch/blob/994258bbefb7722243211654c4f78813312cd5ed/src/Arrch/Arrch.php#L183-L234
229,505
rpnzl/arrch
src/Arrch/Arrch.php
Arrch.merge
public static function merge() { $args = func_get_args(); $where = array(); $options = array(); foreach ($args as $o) { $options = array_merge($options, $o); if (isset($o['where'])) { if (count($where) === 0) { $where = $o['...
php
public static function merge() { $args = func_get_args(); $where = array(); $options = array(); foreach ($args as $o) { $options = array_merge($options, $o); if (isset($o['where'])) { if (count($where) === 0) { $where = $o['...
[ "public", "static", "function", "merge", "(", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "$", "where", "=", "array", "(", ")", ";", "$", "options", "=", "array", "(", ")", ";", "foreach", "(", "$", "args", "as", "$", "o", ")", ...
Recursive array merge for options arrays to eliminate duplicates in a smart manner using a variable number of array arguments. @param arr Various options arrays. @return arr The merged array.
[ "Recursive", "array", "merge", "for", "options", "arrays", "to", "eliminate", "duplicates", "in", "a", "smart", "manner", "using", "a", "variable", "number", "of", "array", "arguments", "." ]
994258bbefb7722243211654c4f78813312cd5ed
https://github.com/rpnzl/arrch/blob/994258bbefb7722243211654c4f78813312cd5ed/src/Arrch/Arrch.php#L319-L346
229,506
thelia-modules/Paybox
Controller/PaymentController.php
PaymentController.sendPaymentNotification
protected function sendPaymentNotification($orderId, $orderReference, $paymentStatus, $payboxMessage) { $this->getMailer()->sendEmailToShopManagers( Paybox::NOTIFICATION_MESSAGE_NAME, [ 'order_ref' => $orderReference, 'order_id' => $orderId, ...
php
protected function sendPaymentNotification($orderId, $orderReference, $paymentStatus, $payboxMessage) { $this->getMailer()->sendEmailToShopManagers( Paybox::NOTIFICATION_MESSAGE_NAME, [ 'order_ref' => $orderReference, 'order_id' => $orderId, ...
[ "protected", "function", "sendPaymentNotification", "(", "$", "orderId", ",", "$", "orderReference", ",", "$", "paymentStatus", ",", "$", "payboxMessage", ")", "{", "$", "this", "->", "getMailer", "(", ")", "->", "sendEmailToShopManagers", "(", "Paybox", "::", ...
Send the payment notification email to the shop admin @param int $orderId @param string $orderReference @param string $paymentStatus @param string $payboxMessage
[ "Send", "the", "payment", "notification", "email", "to", "the", "shop", "admin" ]
08b9f4478ecbdb234fc373d6540010af34d2d87c
https://github.com/thelia-modules/Paybox/blob/08b9f4478ecbdb234fc373d6540010af34d2d87c/Controller/PaymentController.php#L75-L86
229,507
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Writer/CSV.php
PHPExcel_Writer_CSV._writeLine
private function _writeLine($pFileHandle = null, $pValues = null) { if (is_array($pValues)) { // No leading delimiter $writeDelimiter = false; // Build the line $line = ''; foreach ($pValues as $element) { // Escape enclosures $element = str_replace($this->_enclosure, $this->_enclosure . $thi...
php
private function _writeLine($pFileHandle = null, $pValues = null) { if (is_array($pValues)) { // No leading delimiter $writeDelimiter = false; // Build the line $line = ''; foreach ($pValues as $element) { // Escape enclosures $element = str_replace($this->_enclosure, $this->_enclosure . $thi...
[ "private", "function", "_writeLine", "(", "$", "pFileHandle", "=", "null", ",", "$", "pValues", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "pValues", ")", ")", "{", "// No leading delimiter", "$", "writeDelimiter", "=", "false", ";", "// Build...
Write line to CSV file @param mixed $pFileHandle PHP filehandle @param array $pValues Array containing values in a row @throws PHPExcel_Writer_Exception
[ "Write", "line", "to", "CSV", "file" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Writer/CSV.php#L277-L308
229,508
milesj/utility
Console/Command/BaseUpgradeShell.php
BaseUpgradeShell.to
public function to($version) { $this->out(sprintf('<success>Upgrading to %s...</success>', $version)); $schema = sprintf('%s/Config/Schema/Upgrade/%s.sql', CakePlugin::path($this->plugin), $version); if (!file_exists($schema)) { $this->err(sprintf('<error>Upgrade schema %s does not...
php
public function to($version) { $this->out(sprintf('<success>Upgrading to %s...</success>', $version)); $schema = sprintf('%s/Config/Schema/Upgrade/%s.sql', CakePlugin::path($this->plugin), $version); if (!file_exists($schema)) { $this->err(sprintf('<error>Upgrade schema %s does not...
[ "public", "function", "to", "(", "$", "version", ")", "{", "$", "this", "->", "out", "(", "sprintf", "(", "'<success>Upgrading to %s...</success>'", ",", "$", "version", ")", ")", ";", "$", "schema", "=", "sprintf", "(", "'%s/Config/Schema/Upgrade/%s.sql'", ",...
Upgrade to a specific version and trigger any migration callbacks. @param int $version @return bool
[ "Upgrade", "to", "a", "specific", "version", "and", "trigger", "any", "migration", "callbacks", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Console/Command/BaseUpgradeShell.php#L50-L76
229,509
milesj/utility
Console/Command/BaseUpgradeShell.php
BaseUpgradeShell.versions
public function versions() { $this->hr(1); $versions = array(); if ($this->versions) { foreach ($this->versions as $version => $title) { if (in_array($version, $this->complete)) { $this->out('[x] ' . $title); } else { ...
php
public function versions() { $this->hr(1); $versions = array(); if ($this->versions) { foreach ($this->versions as $version => $title) { if (in_array($version, $this->complete)) { $this->out('[x] ' . $title); } else { ...
[ "public", "function", "versions", "(", ")", "{", "$", "this", "->", "hr", "(", "1", ")", ";", "$", "versions", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->", "versions", ")", "{", "foreach", "(", "$", "this", "->", "versions", "as", ...
Output a list of available version to upgrade to.
[ "Output", "a", "list", "of", "available", "version", "to", "upgrade", "to", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Console/Command/BaseUpgradeShell.php#L81-L111
229,510
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readRecordData
private function _readRecordData($data, $pos, $len) { $data = substr($data, $pos, $len); // File not encrypted, or record before encryption start point if ($this->_encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->_encryptionStartPos) { return $data; } $recordData = ''; if ($this->...
php
private function _readRecordData($data, $pos, $len) { $data = substr($data, $pos, $len); // File not encrypted, or record before encryption start point if ($this->_encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->_encryptionStartPos) { return $data; } $recordData = ''; if ($this->...
[ "private", "function", "_readRecordData", "(", "$", "data", ",", "$", "pos", ",", "$", "len", ")", "{", "$", "data", "=", "substr", "(", "$", "data", ",", "$", "pos", ",", "$", "len", ")", ";", "// File not encrypted, or record before encryption start point\...
Read record data from stream, decrypting as required @param string $data Data stream to read from @param int $pos Position to start reading from @param int $length Record data length @return string Record data
[ "Read", "record", "data", "from", "stream", "decrypting", "as", "required" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L1105-L1151
229,511
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readHeader
private function _readHeader() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: var // ...
php
private function _readHeader() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: var // ...
[ "private", "function", "_readHeader", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", "("...
Read HEADER record
[ "Read", "HEADER", "record" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L3107-L3129
229,512
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readHcenter
private function _readHcenter() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 2; 0 = pri...
php
private function _readHcenter() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 2; 0 = pri...
[ "private", "function", "_readHcenter", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", "(...
Read HCENTER record
[ "Read", "HCENTER", "record" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L3162-L3176
229,513
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readPageSetup
private function _readPageSetup() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 2; paper...
php
private function _readPageSetup() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 2; paper...
[ "private", "function", "_readPageSetup", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", ...
Read PAGESETUP record
[ "Read", "PAGESETUP", "record" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L3274-L3325
229,514
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readMulRk
private function _readMulRk() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // offset: 0; size: 2; index to row $row = self::_GetInt2d($re...
php
private function _readMulRk() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // offset: 0; size: 2; index to row $row = self::_GetInt2d($re...
[ "private", "function", "_readMulRk", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", "(",...
Read MULRK record This record represents a cell range containing RK value cells. All cells are located in the same row. -- "OpenOffice.org's Documentation of the Microsoft Excel File Format"
[ "Read", "MULRK", "record", "This", "record", "represents", "a", "cell", "range", "containing", "RK", "value", "cells", ".", "All", "cells", "are", "located", "in", "the", "same", "row", "." ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L3693-L3737
229,515
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readBlank
private function _readBlank() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // offset: 0; size: 2; row index $row = self::_GetInt2d($recor...
php
private function _readBlank() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // offset: 0; size: 2; row index $row = self::_GetInt2d($recor...
[ "private", "function", "_readBlank", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", "(",...
Read BLANK record
[ "Read", "BLANK", "record" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L4136-L4162
229,516
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readSelection
private function _readSelection() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 1; pane ...
php
private function _readSelection() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; if (!$this->_readDataOnly) { // offset: 0; size: 1; pane ...
[ "private", "function", "_readSelection", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", ...
Read SELECTION record. There is one such record for each pane in the sheet.
[ "Read", "SELECTION", "record", ".", "There", "is", "one", "such", "record", "for", "each", "pane", "in", "the", "sheet", "." ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L4384-L4429
229,517
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readRangeProtection
private function _readRangeProtection() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // local pointer in record data $offset = 0; if...
php
private function _readRangeProtection() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // move stream pointer to next record $this->_pos += 4 + $length; // local pointer in record data $offset = 0; if...
[ "private", "function", "_readRangeProtection", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordDat...
Read RANGEPROTECTION record Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, where it is referred to as FEAT record
[ "Read", "RANGEPROTECTION", "record", "Reading", "of", "this", "record", "is", "based", "on", "Microsoft", "Office", "Excel", "97", "-", "2000", "Binary", "File", "Format", "Specification", "where", "it", "is", "referred", "to", "as", "FEAT", "record" ]
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L4974-L5029
229,518
fecshop/yii2-fec
lib/PHPExcel/PHPExcel/Reader/Excel5.php
PHPExcel_Reader_Excel5._readContinue
private function _readContinue() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // check if we are reading drawing data // this is in case a free CONTINUE record occurs in other circumstances we are unaware of ...
php
private function _readContinue() { $length = self::_GetInt2d($this->_data, $this->_pos + 2); $recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length); // check if we are reading drawing data // this is in case a free CONTINUE record occurs in other circumstances we are unaware of ...
[ "private", "function", "_readContinue", "(", ")", "{", "$", "length", "=", "self", "::", "_GetInt2d", "(", "$", "this", "->", "_data", ",", "$", "this", "->", "_pos", "+", "2", ")", ";", "$", "recordData", "=", "$", "this", "->", "_readRecordData", "...
Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented. In this case, we must treat the CONTINUE record as a MSODRAWING record
[ "Read", "a", "free", "CONTINUE", "record", ".", "Free", "CONTINUE", "record", "may", "be", "a", "camouflaged", "MSODRAWING", "record", "When", "MSODRAWING", "data", "on", "a", "sheet", "exceeds", "8224", "bytes", "CONTINUE", "records", "are", "used", "instead"...
fda0e381f931bc503e493bec90185162109018e6
https://github.com/fecshop/yii2-fec/blob/fda0e381f931bc503e493bec90185162109018e6/lib/PHPExcel/PHPExcel/Reader/Excel5.php#L5118-L5160
229,519
fuelphp/common
src/Html.php
Html.tag
public static function tag($name, $attributes = array(), $content = null) { $tag = '<' . $name; $attributeString = static::arrayToAttributes($attributes); //Add the attribute string if needed if ( !empty($attributeString) ) { $tag .= ' ' . $attributeString; } //Work out how we are going to close th...
php
public static function tag($name, $attributes = array(), $content = null) { $tag = '<' . $name; $attributeString = static::arrayToAttributes($attributes); //Add the attribute string if needed if ( !empty($attributeString) ) { $tag .= ' ' . $attributeString; } //Work out how we are going to close th...
[ "public", "static", "function", "tag", "(", "$", "name", ",", "$", "attributes", "=", "array", "(", ")", ",", "$", "content", "=", "null", ")", "{", "$", "tag", "=", "'<'", ".", "$", "name", ";", "$", "attributeString", "=", "static", "::", "arrayT...
Returns a HTML tag @param string $name Name of the tag to render. (Eg, img, form, a...) @param array $attributes Any attributes to apply to the tag to render @param null|string $content If not set to null will create a tag of the form "&lt;name&lt;content&lt;/name&lt;". Otherwise will render as a s...
[ "Returns", "a", "HTML", "tag" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Html.php#L31-L55
229,520
fuelphp/common
src/Html.php
Html.arrayToAttributes
public static function arrayToAttributes(array $attributes) { //Build a list of single attributes first $attributeList = array(); foreach ( $attributes as $key => $value ) { // If the value is not false add the attribute. This allows attributes to not be shown. if ( $value !== false ) { if ( is_s...
php
public static function arrayToAttributes(array $attributes) { //Build a list of single attributes first $attributeList = array(); foreach ( $attributes as $key => $value ) { // If the value is not false add the attribute. This allows attributes to not be shown. if ( $value !== false ) { if ( is_s...
[ "public", "static", "function", "arrayToAttributes", "(", "array", "$", "attributes", ")", "{", "//Build a list of single attributes first", "$", "attributeList", "=", "array", "(", ")", ";", "foreach", "(", "$", "attributes", "as", "$", "key", "=>", "$", "value...
Produces a string of html tag attributes from an array array('name' => 'test', 'foo' => 'bar') becomes: 'name="test" foo="bar"' @param array $attributes @return string
[ "Produces", "a", "string", "of", "html", "tag", "attributes", "from", "an", "array" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Html.php#L68-L90
229,521
hubzero/orcid-php
src/Http/Curl.php
Curl.setHeader
public function setHeader($header) { $headers = []; if (is_array($header)) { foreach ($header as $key => $value) { $headers[] = $key . ': ' . $value; } } else { $headers[] = $header; } $this->setOpt(CURLOPT_HTTPHEADER, $he...
php
public function setHeader($header) { $headers = []; if (is_array($header)) { foreach ($header as $key => $value) { $headers[] = $key . ': ' . $value; } } else { $headers[] = $header; } $this->setOpt(CURLOPT_HTTPHEADER, $he...
[ "public", "function", "setHeader", "(", "$", "header", ")", "{", "$", "headers", "=", "[", "]", ";", "if", "(", "is_array", "(", "$", "header", ")", ")", "{", "foreach", "(", "$", "header", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "...
Sets a header on the request @param string|array $header the header to set @return $this
[ "Sets", "a", "header", "on", "the", "request" ]
2b9a31bd3932af0e18d4b80029901c8ec84a0861
https://github.com/hubzero/orcid-php/blob/2b9a31bd3932af0e18d4b80029901c8ec84a0861/src/Http/Curl.php#L114-L129
229,522
joomla-framework/datetime
src/DateRange.php
DateRange.from
public static function from(Date $start, $amount) { return self::cast(DateTimeRange::from(new DateTime($start), $amount, new DateInterval('P1D'))); }
php
public static function from(Date $start, $amount) { return self::cast(DateTimeRange::from(new DateTime($start), $amount, new DateInterval('P1D'))); }
[ "public", "static", "function", "from", "(", "Date", "$", "start", ",", "$", "amount", ")", "{", "return", "self", "::", "cast", "(", "DateTimeRange", "::", "from", "(", "new", "DateTime", "(", "$", "start", ")", ",", "$", "amount", ",", "new", "Date...
Creates a DateRange object from the start date for the given amount of days. @param Date $start The start date. @param integer $amount The amount of dates included in a range. @return DateRange @since 2.0.0
[ "Creates", "a", "DateRange", "object", "from", "the", "start", "date", "for", "the", "given", "amount", "of", "days", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateRange.php#L49-L52
229,523
joomla-framework/datetime
src/DateRange.php
DateRange.to
public static function to(Date $end, $amount) { return self::cast(DateTimeRange::to(new DateTime($end), $amount, new DateInterval('P1D'))); }
php
public static function to(Date $end, $amount) { return self::cast(DateTimeRange::to(new DateTime($end), $amount, new DateInterval('P1D'))); }
[ "public", "static", "function", "to", "(", "Date", "$", "end", ",", "$", "amount", ")", "{", "return", "self", "::", "cast", "(", "DateTimeRange", "::", "to", "(", "new", "DateTime", "(", "$", "end", ")", ",", "$", "amount", ",", "new", "DateInterval...
Creates a DateRange object to the end date for the given amount of days. @param Date $end The end date. @param integer $amount The amount of dates included in a range. @return DateRange @since 2.0.0
[ "Creates", "a", "DateRange", "object", "to", "the", "end", "date", "for", "the", "given", "amount", "of", "days", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateRange.php#L64-L67
229,524
joomla-framework/datetime
src/DateRange.php
DateRange.cast
private static function cast(DateTimeRange $range) { $start = new Date($range->start()); $end = new Date($range->end()); return new DateRange($start, $end); }
php
private static function cast(DateTimeRange $range) { $start = new Date($range->start()); $end = new Date($range->end()); return new DateRange($start, $end); }
[ "private", "static", "function", "cast", "(", "DateTimeRange", "$", "range", ")", "{", "$", "start", "=", "new", "Date", "(", "$", "range", "->", "start", "(", ")", ")", ";", "$", "end", "=", "new", "Date", "(", "$", "range", "->", "end", "(", ")...
Casts an DateTimeRange object into DateRange. @param DateTimeRange $range A DateTimeRange object @return DateRange @since 2.0.0
[ "Casts", "an", "DateTimeRange", "object", "into", "DateRange", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateRange.php#L296-L302
229,525
fuelphp/common
src/Table/Row.php
Row.set
public function set($key, $value) { if ( !$value instanceof Cell ) { throw new \InvalidArgumentException('Only Cells can be added to Rows'); } parent::set($key, $value); }
php
public function set($key, $value) { if ( !$value instanceof Cell ) { throw new \InvalidArgumentException('Only Cells can be added to Rows'); } parent::set($key, $value); }
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "!", "$", "value", "instanceof", "Cell", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Only Cells can be added to Rows'", ")", ";", "}", "parent", ":...
Overrides the set method from DataContainer to ensure only Cells can be added @throws \InvalidArgumentException
[ "Overrides", "the", "set", "method", "from", "DataContainer", "to", "ensure", "only", "Cells", "can", "be", "added" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Table/Row.php#L39-L47
229,526
milesj/utility
Model/Behavior/SluggableBehavior.php
SluggableBehavior.beforeSave
public function beforeSave(Model $model, $options = array()) { $settings = $this->settings[$model->alias]; if (empty($model->data[$model->alias]) || empty($model->data[$model->alias][$settings['field']]) || !empty($model->data[$model->alias][$settings['slug']])) { re...
php
public function beforeSave(Model $model, $options = array()) { $settings = $this->settings[$model->alias]; if (empty($model->data[$model->alias]) || empty($model->data[$model->alias][$settings['field']]) || !empty($model->data[$model->alias][$settings['slug']])) { re...
[ "public", "function", "beforeSave", "(", "Model", "$", "model", ",", "$", "options", "=", "array", "(", ")", ")", "{", "$", "settings", "=", "$", "this", "->", "settings", "[", "$", "model", "->", "alias", "]", ";", "if", "(", "empty", "(", "$", ...
Generate a slug based on another field. @param Model $model @param array $options @return bool
[ "Generate", "a", "slug", "based", "on", "another", "field", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Model/Behavior/SluggableBehavior.php#L66-L101
229,527
milesj/utility
Model/Behavior/SluggableBehavior.php
SluggableBehavior.slugExists
public function slugExists(Model $model, $slug) { return (bool) $model->find('count', array( 'conditions' => array($this->settings[$model->alias]['slug'] => $slug), 'recursive' => -1, 'contain' => false )); }
php
public function slugExists(Model $model, $slug) { return (bool) $model->find('count', array( 'conditions' => array($this->settings[$model->alias]['slug'] => $slug), 'recursive' => -1, 'contain' => false )); }
[ "public", "function", "slugExists", "(", "Model", "$", "model", ",", "$", "slug", ")", "{", "return", "(", "bool", ")", "$", "model", "->", "find", "(", "'count'", ",", "array", "(", "'conditions'", "=>", "array", "(", "$", "this", "->", "settings", ...
Helper function to check if a slug exists. @param Model $model @param string $slug @return bool
[ "Helper", "function", "to", "check", "if", "a", "slug", "exists", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Model/Behavior/SluggableBehavior.php#L126-L132
229,528
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.add
public function add($title, $url, array $options = array()) { $this->append($title, $url, $options); return $this; }
php
public function add($title, $url, array $options = array()) { $this->append($title, $url, $options); return $this; }
[ "public", "function", "add", "(", "$", "title", ",", "$", "url", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "$", "this", "->", "append", "(", "$", "title", ",", "$", "url", ",", "$", "options", ")", ";", "return", "$", "thi...
Add a breadcrumb to the list. @param string $title @param string|array $url @param array $options @return BreadcrumbHelper
[ "Add", "a", "breadcrumb", "to", "the", "list", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L39-L43
229,529
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.append
public function append($title, $url, array $options = array()) { $this->_crumbs[] = array( 'title' => strip_tags($title), 'url' => $url, 'options' => $options ); $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true))); $this->OpenGra...
php
public function append($title, $url, array $options = array()) { $this->_crumbs[] = array( 'title' => strip_tags($title), 'url' => $url, 'options' => $options ); $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true))); $this->OpenGra...
[ "public", "function", "append", "(", "$", "title", ",", "$", "url", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "$", "this", "->", "_crumbs", "[", "]", "=", "array", "(", "'title'", "=>", "strip_tags", "(", "$", "title", ")", ...
Add a breadcrumb to the end of the list. @param string $title @param string|array $url @param array $options @return BreadcrumbHelper
[ "Add", "a", "breadcrumb", "to", "the", "end", "of", "the", "list", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L53-L64
229,530
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.prepend
public function prepend($title, $url, array $options = array()) { array_unshift($this->_crumbs, array( 'title' => strip_tags($title), 'url' => $url, 'options' => $options )); $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true))); $...
php
public function prepend($title, $url, array $options = array()) { array_unshift($this->_crumbs, array( 'title' => strip_tags($title), 'url' => $url, 'options' => $options )); $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true))); $...
[ "public", "function", "prepend", "(", "$", "title", ",", "$", "url", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "array_unshift", "(", "$", "this", "->", "_crumbs", ",", "array", "(", "'title'", "=>", "strip_tags", "(", "$", "titl...
Add a breadcrumb to the beginning of the list. @param string $title @param string|array $url @param array $options @return BreadcrumbHelper
[ "Add", "a", "breadcrumb", "to", "the", "beginning", "of", "the", "list", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L74-L85
229,531
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.get
public function get($key = '') { if (!$key) { return $this->_crumbs; } $crumbs = array(); foreach ($this->_crumbs as $crumb) { $crumbs[] = isset($crumb[$key]) ? $crumb[$key] : null; } return $crumbs; }
php
public function get($key = '') { if (!$key) { return $this->_crumbs; } $crumbs = array(); foreach ($this->_crumbs as $crumb) { $crumbs[] = isset($crumb[$key]) ? $crumb[$key] : null; } return $crumbs; }
[ "public", "function", "get", "(", "$", "key", "=", "''", ")", "{", "if", "(", "!", "$", "key", ")", "{", "return", "$", "this", "->", "_crumbs", ";", "}", "$", "crumbs", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "_crumbs",...
Return the list of breadcrumbs. @param string $key @return array
[ "Return", "the", "list", "of", "breadcrumbs", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L93-L105
229,532
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.first
public function first($key = '') { $crumbs = $this->get($key); if (!$crumbs) { return null; } $first = array_slice($crumbs, 0, 1); return $first[0]; }
php
public function first($key = '') { $crumbs = $this->get($key); if (!$crumbs) { return null; } $first = array_slice($crumbs, 0, 1); return $first[0]; }
[ "public", "function", "first", "(", "$", "key", "=", "''", ")", "{", "$", "crumbs", "=", "$", "this", "->", "get", "(", "$", "key", ")", ";", "if", "(", "!", "$", "crumbs", ")", "{", "return", "null", ";", "}", "$", "first", "=", "array_slice",...
Return the first crumb in the list. @param string $key @return mixed
[ "Return", "the", "first", "crumb", "in", "the", "list", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L113-L123
229,533
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.last
public function last($key = '') { $crumbs = $this->get($key); if (!$crumbs) { return null; } $last = array_slice($crumbs, -1); return $last[0]; }
php
public function last($key = '') { $crumbs = $this->get($key); if (!$crumbs) { return null; } $last = array_slice($crumbs, -1); return $last[0]; }
[ "public", "function", "last", "(", "$", "key", "=", "''", ")", "{", "$", "crumbs", "=", "$", "this", "->", "get", "(", "$", "key", ")", ";", "if", "(", "!", "$", "crumbs", ")", "{", "return", "null", ";", "}", "$", "last", "=", "array_slice", ...
Return the last crumb in the list. @param string $key @return mixed
[ "Return", "the", "last", "crumb", "in", "the", "list", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L131-L141
229,534
milesj/utility
View/Helper/BreadcrumbHelper.php
BreadcrumbHelper.pageTitle
public function pageTitle($base = '', array $options = array()) { $options = $options + array( 'reverse' => false, 'depth' => 3, 'separator' => ' - ' ); $crumbs = $this->get('title'); $count = count($crumbs); $title = array(); if ($co...
php
public function pageTitle($base = '', array $options = array()) { $options = $options + array( 'reverse' => false, 'depth' => 3, 'separator' => ' - ' ); $crumbs = $this->get('title'); $count = count($crumbs); $title = array(); if ($co...
[ "public", "function", "pageTitle", "(", "$", "base", "=", "''", ",", "array", "$", "options", "=", "array", "(", ")", ")", "{", "$", "options", "=", "$", "options", "+", "array", "(", "'reverse'", "=>", "false", ",", "'depth'", "=>", "3", ",", "'se...
Generate a page title based off the current crumbs. @param string $base @param array $options @return string
[ "Generate", "a", "page", "title", "based", "off", "the", "current", "crumbs", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/View/Helper/BreadcrumbHelper.php#L150-L183
229,535
milesj/utility
Model/Aggregator.php
Aggregator.find
public function find($type = 'first', $query = array()) { $query = $query + array( 'fields' => array(), 'order' => array('date' => 'ASC'), 'limit' => 20, 'feed' => array( 'root' => '', 'cache' => false, 'expires' => ...
php
public function find($type = 'first', $query = array()) { $query = $query + array( 'fields' => array(), 'order' => array('date' => 'ASC'), 'limit' => 20, 'feed' => array( 'root' => '', 'cache' => false, 'expires' => ...
[ "public", "function", "find", "(", "$", "type", "=", "'first'", ",", "$", "query", "=", "array", "(", ")", ")", "{", "$", "query", "=", "$", "query", "+", "array", "(", "'fields'", "=>", "array", "(", ")", ",", "'order'", "=>", "array", "(", "'da...
Overwrite the find method to be specific for feed aggregation. Set the default settings and prepare the URLs. @param string $type @param array $query @return array
[ "Overwrite", "the", "find", "method", "to", "be", "specific", "for", "feed", "aggregation", ".", "Set", "the", "default", "settings", "and", "prepare", "the", "URLs", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Model/Aggregator.php#L37-L50
229,536
milesj/utility
Model/Aggregator.php
Aggregator.afterFind
public function afterFind($results = array(), $primary = false) { if ($results) { foreach ($results as &$result) { if (isset($result['date'])) { if ($time = DateTime::createFromFormat(DateTime::RFC822, $result['date'] . 'C')) { $result['dat...
php
public function afterFind($results = array(), $primary = false) { if ($results) { foreach ($results as &$result) { if (isset($result['date'])) { if ($time = DateTime::createFromFormat(DateTime::RFC822, $result['date'] . 'C')) { $result['dat...
[ "public", "function", "afterFind", "(", "$", "results", "=", "array", "(", ")", ",", "$", "primary", "=", "false", ")", "{", "if", "(", "$", "results", ")", "{", "foreach", "(", "$", "results", "as", "&", "$", "result", ")", "{", "if", "(", "isse...
Format the date a certain way. @param array $results @param bool $primary @return array
[ "Format", "the", "date", "a", "certain", "way", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Model/Aggregator.php#L59-L71
229,537
joomla-framework/datetime
src/Strategy/DateTimeStrategy.php
DateTimeStrategy.startOfWeek
public function startOfWeek(\DateTime $datetime) { $diffInDays = intval($datetime->format('N')) - 1; $intervalSpec = sprintf('P%sD', $diffInDays); $datetime->sub(new \DateInterval($intervalSpec)); }
php
public function startOfWeek(\DateTime $datetime) { $diffInDays = intval($datetime->format('N')) - 1; $intervalSpec = sprintf('P%sD', $diffInDays); $datetime->sub(new \DateInterval($intervalSpec)); }
[ "public", "function", "startOfWeek", "(", "\\", "DateTime", "$", "datetime", ")", "{", "$", "diffInDays", "=", "intval", "(", "$", "datetime", "->", "format", "(", "'N'", ")", ")", "-", "1", ";", "$", "intervalSpec", "=", "sprintf", "(", "'P%sD'", ",",...
Sets time for the start of a week. @param \DateTime $datetime The DateTime object. @return void @since 2.0.0
[ "Sets", "time", "for", "the", "start", "of", "a", "week", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/Strategy/DateTimeStrategy.php#L55-L61
229,538
joomla-framework/datetime
src/Strategy/DateTimeStrategy.php
DateTimeStrategy.endOfWeek
public function endOfWeek(\DateTime $datetime) { $diffInDays = 7 - intval($datetime->format('N')); $intervalSpec = sprintf('P%sD', $diffInDays); $datetime->add(new \DateInterval($intervalSpec)); }
php
public function endOfWeek(\DateTime $datetime) { $diffInDays = 7 - intval($datetime->format('N')); $intervalSpec = sprintf('P%sD', $diffInDays); $datetime->add(new \DateInterval($intervalSpec)); }
[ "public", "function", "endOfWeek", "(", "\\", "DateTime", "$", "datetime", ")", "{", "$", "diffInDays", "=", "7", "-", "intval", "(", "$", "datetime", "->", "format", "(", "'N'", ")", ")", ";", "$", "intervalSpec", "=", "sprintf", "(", "'P%sD'", ",", ...
Sets time for the end of a week. @param \DateTime $datetime The DateTime object. @return void @since 2.0.0
[ "Sets", "time", "for", "the", "end", "of", "a", "week", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/Strategy/DateTimeStrategy.php#L72-L78
229,539
joomla-framework/datetime
src/Strategy/DateTimeStrategy.php
DateTimeStrategy.startOfMonth
public function startOfMonth(\DateTime $datetime) { $year = $datetime->format('Y'); $month = $datetime->format('m'); $datetime->setDate($year, $month, 1); }
php
public function startOfMonth(\DateTime $datetime) { $year = $datetime->format('Y'); $month = $datetime->format('m'); $datetime->setDate($year, $month, 1); }
[ "public", "function", "startOfMonth", "(", "\\", "DateTime", "$", "datetime", ")", "{", "$", "year", "=", "$", "datetime", "->", "format", "(", "'Y'", ")", ";", "$", "month", "=", "$", "datetime", "->", "format", "(", "'m'", ")", ";", "$", "datetime"...
Sets time for the start of a month. @param \DateTime $datetime The DateTime object. @return void @since 2.0.0
[ "Sets", "time", "for", "the", "start", "of", "a", "month", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/Strategy/DateTimeStrategy.php#L89-L95
229,540
joomla-framework/datetime
src/Strategy/DateTimeStrategy.php
DateTimeStrategy.endOfMonth
public function endOfMonth(\DateTime $datetime) { $year = $datetime->format('Y'); $month = $datetime->format('m'); $day = $datetime->format('t'); $datetime->setDate($year, $month, $day); }
php
public function endOfMonth(\DateTime $datetime) { $year = $datetime->format('Y'); $month = $datetime->format('m'); $day = $datetime->format('t'); $datetime->setDate($year, $month, $day); }
[ "public", "function", "endOfMonth", "(", "\\", "DateTime", "$", "datetime", ")", "{", "$", "year", "=", "$", "datetime", "->", "format", "(", "'Y'", ")", ";", "$", "month", "=", "$", "datetime", "->", "format", "(", "'m'", ")", ";", "$", "day", "="...
Sets time for the end of a month. @param \DateTime $datetime The DateTime object. @return void @since 2.0.0
[ "Sets", "time", "for", "the", "end", "of", "a", "month", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/Strategy/DateTimeStrategy.php#L106-L113
229,541
joomla-framework/datetime
src/DateTime.php
DateTime.createFromFormat
public static function createFromFormat($format, $time, \DateTimeZone $timezone = null) { $datetime = is_null($timezone) ? \DateTime::createFromFormat($format, $time) : \DateTime::createFromFormat($format, $time, $timezone); return new static($datetime); }
php
public static function createFromFormat($format, $time, \DateTimeZone $timezone = null) { $datetime = is_null($timezone) ? \DateTime::createFromFormat($format, $time) : \DateTime::createFromFormat($format, $time, $timezone); return new static($datetime); }
[ "public", "static", "function", "createFromFormat", "(", "$", "format", ",", "$", "time", ",", "\\", "DateTimeZone", "$", "timezone", "=", "null", ")", "{", "$", "datetime", "=", "is_null", "(", "$", "timezone", ")", "?", "\\", "DateTime", "::", "createF...
Creates a DateTime object from the given format. @param string $format Format accepted by date(). @param string $time String representing the time. @param \DateTimeZone $timezone The timezone. @return DateTime @since 2.0.0
[ "Creates", "a", "DateTime", "object", "from", "the", "given", "format", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L135-L140
229,542
joomla-framework/datetime
src/DateTime.php
DateTime.create
public static function create($year, $month = '01', $day = '01', $hour = '00', $minute = '00', $second = '00', \DateTimeZone $timezone = null) { $time = sprintf('%04s-%02s-%02s %02s:%02s:%02s', $year, $month, $day, $hour, $minute, $second); return static::createFromFormat('Y-m-d H:i:s', $time, $timezone); }
php
public static function create($year, $month = '01', $day = '01', $hour = '00', $minute = '00', $second = '00', \DateTimeZone $timezone = null) { $time = sprintf('%04s-%02s-%02s %02s:%02s:%02s', $year, $month, $day, $hour, $minute, $second); return static::createFromFormat('Y-m-d H:i:s', $time, $timezone); }
[ "public", "static", "function", "create", "(", "$", "year", ",", "$", "month", "=", "'01'", ",", "$", "day", "=", "'01'", ",", "$", "hour", "=", "'00'", ",", "$", "minute", "=", "'00'", ",", "$", "second", "=", "'00'", ",", "\\", "DateTimeZone", ...
Creates a DateTime object. @param integer $year The year. @param integer $month The month. @param integer $day The day of the month. @param integer $hour The hour. @param integer $minute The minute. @param integer $second The second. @para...
[ "Creates", "a", "DateTime", "object", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L157-L162
229,543
joomla-framework/datetime
src/DateTime.php
DateTime.createFromDate
public static function createFromDate($year, $month = '01', $day = '01', \DateTimeZone $timezone = null) { return static::create($year, $month, $day, '00', '00', '00', $timezone); }
php
public static function createFromDate($year, $month = '01', $day = '01', \DateTimeZone $timezone = null) { return static::create($year, $month, $day, '00', '00', '00', $timezone); }
[ "public", "static", "function", "createFromDate", "(", "$", "year", ",", "$", "month", "=", "'01'", ",", "$", "day", "=", "'01'", ",", "\\", "DateTimeZone", "$", "timezone", "=", "null", ")", "{", "return", "static", "::", "create", "(", "$", "year", ...
Creates a DateTime object with time of the midnight. @param integer $year The year. @param integer $month The month. @param integer $day The day of the month. @param \DateTimeZone $timezone The timezone. @return DateTime @since 2.0.0
[ "Creates", "a", "DateTime", "object", "with", "time", "of", "the", "midnight", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L176-L179
229,544
joomla-framework/datetime
src/DateTime.php
DateTime.createFromTime
public static function createFromTime($hour = '00', $minute = '00', $second = '00', \DateTimeZone $timezone = null) { return static::create(date('Y'), date('m'), date('d'), $hour, $minute, $second, $timezone); }
php
public static function createFromTime($hour = '00', $minute = '00', $second = '00', \DateTimeZone $timezone = null) { return static::create(date('Y'), date('m'), date('d'), $hour, $minute, $second, $timezone); }
[ "public", "static", "function", "createFromTime", "(", "$", "hour", "=", "'00'", ",", "$", "minute", "=", "'00'", ",", "$", "second", "=", "'00'", ",", "\\", "DateTimeZone", "$", "timezone", "=", "null", ")", "{", "return", "static", "::", "create", "(...
Creates a DateTime object with date of today. @param integer $hour The hour. @param integer $minute The minute. @param integer $second The second. @param \DateTimeZone $timezone The timezone. @return DateTime @since 2.0.0
[ "Creates", "a", "DateTime", "object", "with", "date", "of", "today", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L193-L196
229,545
joomla-framework/datetime
src/DateTime.php
DateTime.add
public function add(DateInterval $interval) { return $this->modify( function (\DateTime $datetime) use ($interval) { $datetime->add($interval->getDateInterval()); } ); }
php
public function add(DateInterval $interval) { return $this->modify( function (\DateTime $datetime) use ($interval) { $datetime->add($interval->getDateInterval()); } ); }
[ "public", "function", "add", "(", "DateInterval", "$", "interval", ")", "{", "return", "$", "this", "->", "modify", "(", "function", "(", "\\", "DateTime", "$", "datetime", ")", "use", "(", "$", "interval", ")", "{", "$", "datetime", "->", "add", "(", ...
Returns a new DateTime object by adding an interval to the current one. @param DateInterval $interval The interval to be added. @return DateTime @since 2.0.0
[ "Returns", "a", "new", "DateTime", "object", "by", "adding", "an", "interval", "to", "the", "current", "one", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L324-L332
229,546
joomla-framework/datetime
src/DateTime.php
DateTime.sub
public function sub(DateInterval $interval) { return $this->modify( function (\DateTime $datetime) use ($interval) { $datetime->sub($interval->getDateInterval()); } ); }
php
public function sub(DateInterval $interval) { return $this->modify( function (\DateTime $datetime) use ($interval) { $datetime->sub($interval->getDateInterval()); } ); }
[ "public", "function", "sub", "(", "DateInterval", "$", "interval", ")", "{", "return", "$", "this", "->", "modify", "(", "function", "(", "\\", "DateTime", "$", "datetime", ")", "use", "(", "$", "interval", ")", "{", "$", "datetime", "->", "sub", "(", ...
Returns a new DateTime object by subtracting an interval from the current one. @param DateInterval $interval The interval to be subtracted. @return DateTime @since 2.0.0
[ "Returns", "a", "new", "DateTime", "object", "by", "subtracting", "an", "interval", "from", "the", "current", "one", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L343-L351
229,547
joomla-framework/datetime
src/DateTime.php
DateTime.getStrategy
protected function getStrategy() { if (is_null($this->strategy)) { $this->strategy = new Strategy\DateTimeStrategy; } return $this->strategy; }
php
protected function getStrategy() { if (is_null($this->strategy)) { $this->strategy = new Strategy\DateTimeStrategy; } return $this->strategy; }
[ "protected", "function", "getStrategy", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "strategy", ")", ")", "{", "$", "this", "->", "strategy", "=", "new", "Strategy", "\\", "DateTimeStrategy", ";", "}", "return", "$", "this", "->", "str...
Gets the Strategy implementation. @return Strategy\StrategyInterface @since 2.0.0
[ "Gets", "the", "Strategy", "implementation", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L931-L939
229,548
joomla-framework/datetime
src/DateTime.php
DateTime.calc
private function calc($value, $format) { $value = intval($value); $spec = sprintf($format, abs($value)); return $value > 0 ? $this->add(new DateInterval($spec)) : $this->sub(new DateInterval($spec)); }
php
private function calc($value, $format) { $value = intval($value); $spec = sprintf($format, abs($value)); return $value > 0 ? $this->add(new DateInterval($spec)) : $this->sub(new DateInterval($spec)); }
[ "private", "function", "calc", "(", "$", "value", ",", "$", "format", ")", "{", "$", "value", "=", "intval", "(", "$", "value", ")", ";", "$", "spec", "=", "sprintf", "(", "$", "format", ",", "abs", "(", "$", "value", ")", ")", ";", "return", "...
Creates a DateTime by adding or subtacting interval. @param integer $value The value for the format. @param string $format The interval_spec for sprintf(), eg. 'P%sD'. @return DateTime @since 2.0.0
[ "Creates", "a", "DateTime", "by", "adding", "or", "subtacting", "interval", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L951-L957
229,549
joomla-framework/datetime
src/DateTime.php
DateTime.fixMonth
private function fixMonth(DateTime $result) { if ($result->format('d') != $this->format('d')) { $result = $result->subMonths(1); $result->datetime->setDate($result->format('Y'), $result->format('m'), $result->format('t')); } return $result; }
php
private function fixMonth(DateTime $result) { if ($result->format('d') != $this->format('d')) { $result = $result->subMonths(1); $result->datetime->setDate($result->format('Y'), $result->format('m'), $result->format('t')); } return $result; }
[ "private", "function", "fixMonth", "(", "DateTime", "$", "result", ")", "{", "if", "(", "$", "result", "->", "format", "(", "'d'", ")", "!=", "$", "this", "->", "format", "(", "'d'", ")", ")", "{", "$", "result", "=", "$", "result", "->", "subMonth...
If a day has changed, sets the date on the last day of the previous month. @param DateTime $result A result of months or years addition @return DateTime @since 2.0.0
[ "If", "a", "day", "has", "changed", "sets", "the", "date", "on", "the", "last", "day", "of", "the", "previous", "month", "." ]
732fb60f054fa6aceaef93ff9a12d939d2a4797c
https://github.com/joomla-framework/datetime/blob/732fb60f054fa6aceaef93ff9a12d939d2a4797c/src/DateTime.php#L985-L994
229,550
milesj/utility
Console/Command/CacheKillShell.php
CacheKillShell.core
public function core() { $key = isset($this->params['key']) ? $this->params['key'] : null; $config = isset($this->params['config']) ? $this->params['config'] : 'default'; if ($key) { $this->out(sprintf('Clearing %s in %s...', $key, $config)); Cache::delete($key, $config)...
php
public function core() { $key = isset($this->params['key']) ? $this->params['key'] : null; $config = isset($this->params['config']) ? $this->params['config'] : 'default'; if ($key) { $this->out(sprintf('Clearing %s in %s...', $key, $config)); Cache::delete($key, $config)...
[ "public", "function", "core", "(", ")", "{", "$", "key", "=", "isset", "(", "$", "this", "->", "params", "[", "'key'", "]", ")", "?", "$", "this", "->", "params", "[", "'key'", "]", ":", "null", ";", "$", "config", "=", "isset", "(", "$", "this...
Delete CakePHP cache.
[ "Delete", "CakePHP", "cache", "." ]
146318ff0a882917defab7f4918b0d198eb5a3c0
https://github.com/milesj/utility/blob/146318ff0a882917defab7f4918b0d198eb5a3c0/Console/Command/CacheKillShell.php#L44-L58
229,551
fuelphp/common
src/CookieJar.php
CookieJar.setParent
public function setParent(CookieJar $parent = null) { $this->parent = $parent; if ($this->parent) { $this->enableParent(); $this->parent->setChild($this); } else { $this->disableParent(); } return $this; }
php
public function setParent(CookieJar $parent = null) { $this->parent = $parent; if ($this->parent) { $this->enableParent(); $this->parent->setChild($this); } else { $this->disableParent(); } return $this; }
[ "public", "function", "setParent", "(", "CookieJar", "$", "parent", "=", "null", ")", "{", "$", "this", "->", "parent", "=", "$", "parent", ";", "if", "(", "$", "this", "->", "parent", ")", "{", "$", "this", "->", "enableParent", "(", ")", ";", "$"...
Set the parent of this cookie jar, to support inheritance @param CookieJar $parent the parent cookie jar object @return $this @since 2.0.0
[ "Set", "the", "parent", "of", "this", "cookie", "jar", "to", "support", "inheritance" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L99-L114
229,552
fuelphp/common
src/CookieJar.php
CookieJar.has
public function has($key) { if ( ! isset($this->jar[$key]) or $this->jar[$key]->isDeleted()) { if ( ! $this->parentEnabled or ! $this->parent->has($key)) { return false; } } return true; }
php
public function has($key) { if ( ! isset($this->jar[$key]) or $this->jar[$key]->isDeleted()) { if ( ! $this->parentEnabled or ! $this->parent->has($key)) { return false; } } return true; }
[ "public", "function", "has", "(", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "jar", "[", "$", "key", "]", ")", "or", "$", "this", "->", "jar", "[", "$", "key", "]", "->", "isDeleted", "(", ")", ")", "{", "if", "(...
Check if we have this cookie in the jar @param string $key @return bool @since 2.0.0
[ "Check", "if", "we", "have", "this", "cookie", "in", "the", "jar" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L163-L174
229,553
fuelphp/common
src/CookieJar.php
CookieJar.delete
public function delete($key) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]->delete(); } elseif ($this->has($key)) { return $this->parent->delete($key); } return false; }
php
public function delete($key) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]->delete(); } elseif ($this->has($key)) { return $this->parent->delete($key); } return false; }
[ "public", "function", "delete", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "jar", "[", "$", "key", "]", ")", "and", "!", "$", "this", "->", "jar", "[", "$", "key", "]", "->", "isDeleted", "(", ")", ")", "{", "retur...
Remove a cookie from the cookie jar @param string $key key to delete @return boolean delete success boolean @since 2.0.0
[ "Remove", "a", "cookie", "from", "the", "cookie", "jar" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L183-L195
229,554
fuelphp/common
src/CookieJar.php
CookieJar.get
public function get($key, $default = null) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]->getValue(); } elseif ($this->has($key)) { return $this->parent->get($key, $default); } return $default; }
php
public function get($key, $default = null) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]->getValue(); } elseif ($this->has($key)) { return $this->parent->get($key, $default); } return $default; }
[ "public", "function", "get", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "jar", "[", "$", "key", "]", ")", "and", "!", "$", "this", "->", "jar", "[", "$", "key", "]", "->", "isDelet...
Get a cookie's value from the cookie jar @param string $key @param mixed $default @return mixed @since 2.0.0
[ "Get", "a", "cookie", "s", "value", "from", "the", "cookie", "jar" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L205-L217
229,555
fuelphp/common
src/CookieJar.php
CookieJar.send
public function send() { $result = true; // process the cookies in this jar foreach ($this->jar as $cookie) { if ( ! $cookie->send()) { $result = false; } } // and the cookies in this jar's children foreach ($this->children as $cookie) { if ( ! $cookie->send()) { $result = fals...
php
public function send() { $result = true; // process the cookies in this jar foreach ($this->jar as $cookie) { if ( ! $cookie->send()) { $result = false; } } // and the cookies in this jar's children foreach ($this->children as $cookie) { if ( ! $cookie->send()) { $result = fals...
[ "public", "function", "send", "(", ")", "{", "$", "result", "=", "true", ";", "// process the cookies in this jar", "foreach", "(", "$", "this", "->", "jar", "as", "$", "cookie", ")", "{", "if", "(", "!", "$", "cookie", "->", "send", "(", ")", ")", "...
Send all cookies to the client @return bool @since 2.0.0
[ "Send", "all", "cookies", "to", "the", "client" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L268-L291
229,556
fuelphp/common
src/CookieJar.php
CookieJar.getJar
protected function getJar() { if ($this->parentEnabled) { return array_merge($this->parent->getJar(), $this->jar); } else { return $this->jar; } }
php
protected function getJar() { if ($this->parentEnabled) { return array_merge($this->parent->getJar(), $this->jar); } else { return $this->jar; } }
[ "protected", "function", "getJar", "(", ")", "{", "if", "(", "$", "this", "->", "parentEnabled", ")", "{", "return", "array_merge", "(", "$", "this", "->", "parent", "->", "getJar", "(", ")", ",", "$", "this", "->", "jar", ")", ";", "}", "else", "{...
Allows the ArrayIterator to fetch parent data @since 2.0.0
[ "Allows", "the", "ArrayIterator", "to", "fetch", "parent", "data" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L326-L336
229,557
fuelphp/common
src/CookieJar.php
CookieJar.setChild
public function setChild(CookieJar $child) { if ( ! in_array($child, $this->children)) { $this->children[] = $child; } }
php
public function setChild(CookieJar $child) { if ( ! in_array($child, $this->children)) { $this->children[] = $child; } }
[ "public", "function", "setChild", "(", "CookieJar", "$", "child", ")", "{", "if", "(", "!", "in_array", "(", "$", "child", ",", "$", "this", "->", "children", ")", ")", "{", "$", "this", "->", "children", "[", "]", "=", "$", "child", ";", "}", "}...
Register a child of this cookie jar, to support inheritance @param CookieJar $child the child cookie jar object @since 2.0.0
[ "Register", "a", "child", "of", "this", "cookie", "jar", "to", "support", "inheritance" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L345-L351
229,558
fuelphp/common
src/CookieJar.php
CookieJar.offsetGet
public function offsetGet($key) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]; } elseif ($this->has($key)) { return $this->parent[$key]; } else { throw new \OutOfBoundsException('Access to undefined cookie: '.$key); } }
php
public function offsetGet($key) { if (isset($this->jar[$key]) and ! $this->jar[$key]->isDeleted()) { return $this->jar[$key]; } elseif ($this->has($key)) { return $this->parent[$key]; } else { throw new \OutOfBoundsException('Access to undefined cookie: '.$key); } }
[ "public", "function", "offsetGet", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "jar", "[", "$", "key", "]", ")", "and", "!", "$", "this", "->", "jar", "[", "$", "key", "]", "->", "isDeleted", "(", ")", ")", "{", "re...
Allow fetching values as an array @param string $key @return mixed @throws OutOfBoundsException @since 2.0.0
[ "Allow", "fetching", "values", "as", "an", "array" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L376-L390
229,559
fuelphp/common
src/CookieJar.php
CookieJar.offsetUnset
public function offsetUnset($key) { if (isset($this->jar[$key])) { $this->jar[$key]->delete(); } elseif ($this->parentEnabled) { $this->parent->delete($key); } }
php
public function offsetUnset($key) { if (isset($this->jar[$key])) { $this->jar[$key]->delete(); } elseif ($this->parentEnabled) { $this->parent->delete($key); } }
[ "public", "function", "offsetUnset", "(", "$", "key", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "jar", "[", "$", "key", "]", ")", ")", "{", "$", "this", "->", "jar", "[", "$", "key", "]", "->", "delete", "(", ")", ";", "}", "elsei...
Allow unsetting values like an array @param string $key @since 2.0.0
[ "Allow", "unsetting", "values", "like", "an", "array" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/CookieJar.php#L413-L423
229,560
gridonic/hapi
src/Harvest/Model/Result.php
Result.get
public function get($property) { switch ($property) { case 'code': return $this->_code; break; case 'data': return $this->_data; break; case 'headers': return $this->_headers; break; ...
php
public function get($property) { switch ($property) { case 'code': return $this->_code; break; case 'data': return $this->_data; break; case 'headers': return $this->_headers; break; ...
[ "public", "function", "get", "(", "$", "property", ")", "{", "switch", "(", "$", "property", ")", "{", "case", "'code'", ":", "return", "$", "this", "->", "_code", ";", "break", ";", "case", "'data'", ":", "return", "$", "this", "->", "_data", ";", ...
Return the specified property @param mixed $property The property to return @return mixed @throws HarvestException
[ "Return", "the", "specified", "property" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/Model/Result.php#L89-L109
229,561
gridonic/hapi
src/Harvest/Model/Result.php
Result.set
public function set($property, $value) { switch ($property) { case 'code': $this->_code = $value; break; case 'data': $this->_data = $value; break; case 'headers': $this->_headers = $value; ...
php
public function set($property, $value) { switch ($property) { case 'code': $this->_code = $value; break; case 'data': $this->_data = $value; break; case 'headers': $this->_headers = $value; ...
[ "public", "function", "set", "(", "$", "property", ",", "$", "value", ")", "{", "switch", "(", "$", "property", ")", "{", "case", "'code'", ":", "$", "this", "->", "_code", "=", "$", "value", ";", "break", ";", "case", "'data'", ":", "$", "this", ...
sets the specified property @param mixed $property The property to set @param mixed $value value of property @throws HarvestException
[ "sets", "the", "specified", "property" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/Model/Result.php#L131-L147
229,562
odan/database
src/Database/Quoter.php
Quoter.quoteArray
public function quoteArray(array $array): array { if (empty($array)) { return []; } foreach ($array as $key => $value) { if ($value instanceof RawExp) { $array[$key] = $value->getValue(); continue; } $array[$key...
php
public function quoteArray(array $array): array { if (empty($array)) { return []; } foreach ($array as $key => $value) { if ($value instanceof RawExp) { $array[$key] = $value->getValue(); continue; } $array[$key...
[ "public", "function", "quoteArray", "(", "array", "$", "array", ")", ":", "array", "{", "if", "(", "empty", "(", "$", "array", ")", ")", "{", "return", "[", "]", ";", "}", "foreach", "(", "$", "array", "as", "$", "key", "=>", "$", "value", ")", ...
Quote array values. @param array $array @return array
[ "Quote", "array", "values", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L36-L51
229,563
odan/database
src/Database/Quoter.php
Quoter.quoteValue
public function quoteValue($value): string { if ($value === null) { return 'NULL'; } $result = $this->pdo->quote($value); if ($result === false) { throw new RuntimeException('The database driver does not support quoting in this way.'); } ret...
php
public function quoteValue($value): string { if ($value === null) { return 'NULL'; } $result = $this->pdo->quote($value); if ($result === false) { throw new RuntimeException('The database driver does not support quoting in this way.'); } ret...
[ "public", "function", "quoteValue", "(", "$", "value", ")", ":", "string", "{", "if", "(", "$", "value", "===", "null", ")", "{", "return", "'NULL'", ";", "}", "$", "result", "=", "$", "this", "->", "pdo", "->", "quote", "(", "$", "value", ")", "...
Quotes a value for use in a query. @param mixed $value @throws RuntimeException @return string a quoted string
[ "Quotes", "a", "value", "for", "use", "in", "a", "query", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L62-L75
229,564
odan/database
src/Database/Quoter.php
Quoter.quoteNames
public function quoteNames(array $identifiers): array { foreach ($identifiers as $key => $identifier) { if ($identifier instanceof RawExp) { $identifiers[$key] = $identifier->getValue(); continue; } $identifiers[$key] = $this->quoteName($id...
php
public function quoteNames(array $identifiers): array { foreach ($identifiers as $key => $identifier) { if ($identifier instanceof RawExp) { $identifiers[$key] = $identifier->getValue(); continue; } $identifiers[$key] = $this->quoteName($id...
[ "public", "function", "quoteNames", "(", "array", "$", "identifiers", ")", ":", "array", "{", "foreach", "(", "$", "identifiers", "as", "$", "key", "=>", "$", "identifier", ")", "{", "if", "(", "$", "identifier", "instanceof", "RawExp", ")", "{", "$", ...
Quote array of names. @param array $identifiers @return array
[ "Quote", "array", "of", "names", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L84-L95
229,565
odan/database
src/Database/Quoter.php
Quoter.quoteNameWithSeparator
protected function quoteNameWithSeparator(string $spec, string $sep, int $pos): string { $len = strlen($sep); $part1 = $this->quoteName(substr($spec, 0, $pos)); $part2 = $this->quoteIdentifier(substr($spec, $pos + $len)); return "{$part1}{$sep}{$part2}"; }
php
protected function quoteNameWithSeparator(string $spec, string $sep, int $pos): string { $len = strlen($sep); $part1 = $this->quoteName(substr($spec, 0, $pos)); $part2 = $this->quoteIdentifier(substr($spec, $pos + $len)); return "{$part1}{$sep}{$part2}"; }
[ "protected", "function", "quoteNameWithSeparator", "(", "string", "$", "spec", ",", "string", "$", "sep", ",", "int", "$", "pos", ")", ":", "string", "{", "$", "len", "=", "strlen", "(", "$", "sep", ")", ";", "$", "part1", "=", "$", "this", "->", "...
Quotes an identifier that has a separator. @param string $spec the identifier name to quote @param string $sep the separator, typically a dot or space @param int $pos the position of the separator @return string the quoted identifier name
[ "Quotes", "an", "identifier", "that", "has", "a", "separator", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L129-L136
229,566
odan/database
src/Database/Quoter.php
Quoter.quoteSetValues
public function quoteSetValues(array $row): string { $values = []; foreach ($row as $key => $value) { if ($value instanceof RawExp) { $values[] = $this->quoteName($key) . '=' . $value->getValue(); continue; } $values[] = $this->quot...
php
public function quoteSetValues(array $row): string { $values = []; foreach ($row as $key => $value) { if ($value instanceof RawExp) { $values[] = $this->quoteName($key) . '=' . $value->getValue(); continue; } $values[] = $this->quot...
[ "public", "function", "quoteSetValues", "(", "array", "$", "row", ")", ":", "string", "{", "$", "values", "=", "[", "]", ";", "foreach", "(", "$", "row", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "$", "value", "instanceof", "RawExp...
Quote Set values. @param array $row A row @return string Sql string
[ "Quote", "Set", "values", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L170-L182
229,567
odan/database
src/Database/Quoter.php
Quoter.quoteBulkValues
public function quoteBulkValues(array $row): string { $values = []; foreach ($row as $key => $value) { $values[] = $this->quoteValue($value); } return implode(',', $values); }
php
public function quoteBulkValues(array $row): string { $values = []; foreach ($row as $key => $value) { $values[] = $this->quoteValue($value); } return implode(',', $values); }
[ "public", "function", "quoteBulkValues", "(", "array", "$", "row", ")", ":", "string", "{", "$", "values", "=", "[", "]", ";", "foreach", "(", "$", "row", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "values", "[", "]", "=", "$", "this", ...
Quote bulk values. @param array $row A row @return string Sql string
[ "Quote", "bulk", "values", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L191-L199
229,568
odan/database
src/Database/Quoter.php
Quoter.quoteFields
public function quoteFields(array $row): string { $fields = []; foreach (array_keys($row) as $field) { $fields[] = $this->quoteName($field); } return implode(', ', $fields); }
php
public function quoteFields(array $row): string { $fields = []; foreach (array_keys($row) as $field) { $fields[] = $this->quoteName($field); } return implode(', ', $fields); }
[ "public", "function", "quoteFields", "(", "array", "$", "row", ")", ":", "string", "{", "$", "fields", "=", "[", "]", ";", "foreach", "(", "array_keys", "(", "$", "row", ")", "as", "$", "field", ")", "{", "$", "fields", "[", "]", "=", "$", "this"...
Quote fields values. @param array $row A row @return string Sql string
[ "Quote", "fields", "values", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Quoter.php#L208-L216
229,569
chadicus/marvel-api-client
src/DataContainer.php
DataContainer.deriveResourceFilter
private static function deriveResourceFilter($results) { $default = function () { return []; }; if (!is_array($results) || !isset($results[0]['resourceURI'])) { return $default; } $pattern = '^' . preg_quote(Client::BASE_URL) . '(?P<resource>[a-z]*)/...
php
private static function deriveResourceFilter($results) { $default = function () { return []; }; if (!is_array($results) || !isset($results[0]['resourceURI'])) { return $default; } $pattern = '^' . preg_quote(Client::BASE_URL) . '(?P<resource>[a-z]*)/...
[ "private", "static", "function", "deriveResourceFilter", "(", "$", "results", ")", "{", "$", "default", "=", "function", "(", ")", "{", "return", "[", "]", ";", "}", ";", "if", "(", "!", "is_array", "(", "$", "results", ")", "||", "!", "isset", "(", ...
Helper method to derive the filter to use for the given resource array @param mixed $results The results array from the API. @return callable The filter to use
[ "Helper", "method", "to", "derive", "the", "filter", "to", "use", "for", "the", "given", "resource", "array" ]
a27729f070c0a3f14b2d2df3a3961590e2d59cb2
https://github.com/chadicus/marvel-api-client/blob/a27729f070c0a3f14b2d2df3a3961590e2d59cb2/src/DataContainer.php#L79-L93
229,570
Codegyre/RoboCI
src/Command/CI.php
CI.ciRun
public function ciRun($environment, $args = '') { $runner = new Runner($environment); $runner->buildImage(); $runner->runServices(); $res = $runner->getContainerRunner() ->exec($runner->getRunCommand()) ->args($args) ->run(); $runner->stop...
php
public function ciRun($environment, $args = '') { $runner = new Runner($environment); $runner->buildImage(); $runner->runServices(); $res = $runner->getContainerRunner() ->exec($runner->getRunCommand()) ->args($args) ->run(); $runner->stop...
[ "public", "function", "ciRun", "(", "$", "environment", ",", "$", "args", "=", "''", ")", "{", "$", "runner", "=", "new", "Runner", "(", "$", "environment", ")", ";", "$", "runner", "->", "buildImage", "(", ")", ";", "$", "runner", "->", "runServices...
Executes build for specified RoboCI environment @param $environment @param string $args additional arguments @return int
[ "Executes", "build", "for", "specified", "RoboCI", "environment" ]
886f340d7d8ca808607da9a41d2e6ba18075bdf1
https://github.com/Codegyre/RoboCI/blob/886f340d7d8ca808607da9a41d2e6ba18075bdf1/src/Command/CI.php#L25-L44
229,571
Codegyre/RoboCI
src/Command/CI.php
CI.ciShell
public function ciShell($environment, $args = '') { $runner = new Runner($environment); $res = $runner->buildImage(); if (!$res->wasSuccessful()) return 1; $runner->runServices(); $links = array_keys($runner->getServices()); $links = implode(' ', array_map(function(...
php
public function ciShell($environment, $args = '') { $runner = new Runner($environment); $res = $runner->buildImage(); if (!$res->wasSuccessful()) return 1; $runner->runServices(); $links = array_keys($runner->getServices()); $links = implode(' ', array_map(function(...
[ "public", "function", "ciShell", "(", "$", "environment", ",", "$", "args", "=", "''", ")", "{", "$", "runner", "=", "new", "Runner", "(", "$", "environment", ")", ";", "$", "res", "=", "$", "runner", "->", "buildImage", "(", ")", ";", "if", "(", ...
Runs interactive bash shell in RoboCI environment @param $environment @param string $args
[ "Runs", "interactive", "bash", "shell", "in", "RoboCI", "environment" ]
886f340d7d8ca808607da9a41d2e6ba18075bdf1
https://github.com/Codegyre/RoboCI/blob/886f340d7d8ca808607da9a41d2e6ba18075bdf1/src/Command/CI.php#L51-L72
229,572
odan/database
src/Database/Connection.php
Connection.queryValues
public function queryValues(string $sql, string $key): array { $result = []; $statement = $this->query($sql); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $result[] = $row[$key]; } return $result; }
php
public function queryValues(string $sql, string $key): array { $result = []; $statement = $this->query($sql); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { $result[] = $row[$key]; } return $result; }
[ "public", "function", "queryValues", "(", "string", "$", "sql", ",", "string", "$", "key", ")", ":", "array", "{", "$", "result", "=", "[", "]", ";", "$", "statement", "=", "$", "this", "->", "query", "(", "$", "sql", ")", ";", "while", "(", "$",...
Retrieving a list of column values. sample: $lists = $db->queryValues('SELECT id FROM table;', 'id'); @param string $sql @param string $key @return array
[ "Retrieving", "a", "list", "of", "column", "values", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Connection.php#L71-L80
229,573
odan/database
src/Database/Connection.php
Connection.queryValue
public function queryValue(string $sql, string $column, $default = null) { $result = $default; if ($row = $this->query($sql)->fetch(PDO::FETCH_ASSOC)) { $result = $row[$column]; } return $result; }
php
public function queryValue(string $sql, string $column, $default = null) { $result = $default; if ($row = $this->query($sql)->fetch(PDO::FETCH_ASSOC)) { $result = $row[$column]; } return $result; }
[ "public", "function", "queryValue", "(", "string", "$", "sql", ",", "string", "$", "column", ",", "$", "default", "=", "null", ")", "{", "$", "result", "=", "$", "default", ";", "if", "(", "$", "row", "=", "$", "this", "->", "query", "(", "$", "s...
Retrieve only the given column of the first result row. @param string $sql @param string $column @param mixed $default @return mixed|null
[ "Retrieve", "only", "the", "given", "column", "of", "the", "first", "result", "row", "." ]
e514fb45ab72718a77b34ed2c44906f5159e8278
https://github.com/odan/database/blob/e514fb45ab72718a77b34ed2c44906f5159e8278/src/Database/Connection.php#L91-L99
229,574
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getActiveClients
public function getActiveClients() { $result = $this->getClients(); if ( $result->isSuccess() ) { $clients = array(); foreach ($result->data as $client) { if ($client->active == "true") { $clients[$client->id] = $client; } ...
php
public function getActiveClients() { $result = $this->getClients(); if ( $result->isSuccess() ) { $clients = array(); foreach ($result->data as $client) { if ($client->active == "true") { $clients[$client->id] = $client; } ...
[ "public", "function", "getActiveClients", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getClients", "(", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "clients", "=", "array", "(", ")", ";", "foreach", "(...
get all active clients <code> $api = new HarvestReports(); $result = $api->getActiveClients(); if ( $result->isSuccess() ) { $clients = $result->data; } </code> @return Result
[ "get", "all", "active", "clients" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L94-L108
229,575
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getInactiveProjects
public function getInactiveProjects() { $result = $this->getProjects(); if ( $result->isSuccess() ) { $projects = array(); foreach ($result->data as $project) { if ($project->active == "false") { $projects[$project->id] = $project; ...
php
public function getInactiveProjects() { $result = $this->getProjects(); if ( $result->isSuccess() ) { $projects = array(); foreach ($result->data as $project) { if ($project->active == "false") { $projects[$project->id] = $project; ...
[ "public", "function", "getInactiveProjects", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getProjects", "(", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "projects", "=", "array", "(", ")", ";", "foreach",...
get all inactive projects <code> $api = new HarvestReports(); $result = $api->getInactiveProjects(); if ( $result->isSuccess() ) { $projects = $result->data; } </code> @return Result
[ "get", "all", "inactive", "projects" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L184-L198
229,576
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getClientActiveProjects
public function getClientActiveProjects($client_id) { $result = $this->getClientProjects( $client_id ); if ( $result->isSuccess() ) { $projects = array(); foreach ($result->data as $project) { if ($project->active == "true") { $projects[$pr...
php
public function getClientActiveProjects($client_id) { $result = $this->getClientProjects( $client_id ); if ( $result->isSuccess() ) { $projects = array(); foreach ($result->data as $project) { if ($project->active == "true") { $projects[$pr...
[ "public", "function", "getClientActiveProjects", "(", "$", "client_id", ")", "{", "$", "result", "=", "$", "this", "->", "getClientProjects", "(", "$", "client_id", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "projects...
get all active projects <code> $api = new HarvestReports(); $result = $api->getClientActiveProjects( 12345 ); if ( $result->isSuccess() ) { $projects = $result->data; } </code> @param int $client_id Client Identifier @return Result
[ "get", "all", "active", "projects" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L215-L229
229,577
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getActiveUsers
public function getActiveUsers() { $result = $this->getUsers(); if ( $result->isSuccess() ) { $data = array(); foreach ($result->data as $obj) { /** @var \Harvest\Model\User $obj */ if ( $obj->get("is-active") == "true" ) { ...
php
public function getActiveUsers() { $result = $this->getUsers(); if ( $result->isSuccess() ) { $data = array(); foreach ($result->data as $obj) { /** @var \Harvest\Model\User $obj */ if ( $obj->get("is-active") == "true" ) { ...
[ "public", "function", "getActiveUsers", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getUsers", "(", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(", "$...
get all active users <code> $api = new HarvestReports(); $result = $api->getActiveUsers(); if ( $result->isSuccess() ) { $users = $result->data; } </code> @return Result
[ "get", "all", "active", "users" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L276-L291
229,578
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getActiveTimers
public function getActiveTimers() { $result = $this->getActiveUsers( ); if ( $result->isSuccess() ) { $data = array(); foreach ($result->data as $user) { $subResult = $this->getUserEntries( $user->id, Range::today( $this->_timeZone ) ); if ( $s...
php
public function getActiveTimers() { $result = $this->getActiveUsers( ); if ( $result->isSuccess() ) { $data = array(); foreach ($result->data as $user) { $subResult = $this->getUserEntries( $user->id, Range::today( $this->_timeZone ) ); if ( $s...
[ "public", "function", "getActiveTimers", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getActiveUsers", "(", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "data", "=", "array", "(", ")", ";", "foreach", "(...
get all active time entries <code> $api = new HarvestReports(); $result = $api->getActiveTimers( ); if ( $result->isSuccess() ) { $entries = $result->data; } </code> @return Result
[ "get", "all", "active", "time", "entries" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L524-L544
229,579
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getUsersActiveTimer
public function getUsersActiveTimer($user_id) { $result = $this->getUserEntries( $user_id, Range::today( $this->_timeZone ) ); if ( $result->isSuccess() ) { $data = null; foreach ($result->data as $entry) { if ($entry->timer_started_at != null || $entry->timer...
php
public function getUsersActiveTimer($user_id) { $result = $this->getUserEntries( $user_id, Range::today( $this->_timeZone ) ); if ( $result->isSuccess() ) { $data = null; foreach ($result->data as $entry) { if ($entry->timer_started_at != null || $entry->timer...
[ "public", "function", "getUsersActiveTimer", "(", "$", "user_id", ")", "{", "$", "result", "=", "$", "this", "->", "getUserEntries", "(", "$", "user_id", ",", "Range", "::", "today", "(", "$", "this", "->", "_timeZone", ")", ")", ";", "if", "(", "$", ...
get a user's active time entry <code> $api = new HarvestReports(); $result = $api->getUsersActiveTimer( 12345 ); if ( $result->isSuccess() ) { $activeTimer = $result->data; } </code> @param $user_id @return Result
[ "get", "a", "user", "s", "active", "time", "entry" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L561-L576
229,580
gridonic/hapi
src/Harvest/HarvestReports.php
HarvestReports.getProjectTasks
public function getProjectTasks($project_id) { $result = $this->getProjectTaskAssignments($project_id); if ($result->isSuccess()) { $tasks = array(); foreach ($result->data as $taskAssignment) { $taskResult = $this->getTask($taskAssignment->task_id); ...
php
public function getProjectTasks($project_id) { $result = $this->getProjectTaskAssignments($project_id); if ($result->isSuccess()) { $tasks = array(); foreach ($result->data as $taskAssignment) { $taskResult = $this->getTask($taskAssignment->task_id); ...
[ "public", "function", "getProjectTasks", "(", "$", "project_id", ")", "{", "$", "result", "=", "$", "this", "->", "getProjectTaskAssignments", "(", "$", "project_id", ")", ";", "if", "(", "$", "result", "->", "isSuccess", "(", ")", ")", "{", "$", "tasks"...
get all tasks assigned to a project <code> $api = new HarvestReports(); $result = $api->getProjectTasks( 12345 ); if ( $result->isSuccess() ) { $tasks = $result->data; } </code> @param $project_id @return Result
[ "get", "all", "tasks", "assigned", "to", "a", "project" ]
018c05b548428aa3e8d1040e0e2b1ec75b85adfe
https://github.com/gridonic/hapi/blob/018c05b548428aa3e8d1040e0e2b1ec75b85adfe/src/Harvest/HarvestReports.php#L593-L608
229,581
fuelphp/common
src/Arr.php
Arr.delete
public static function delete(&$array, $key) { if (is_null($key)) { return false; } if (is_array($key)) { $return = array(); foreach ($key as $k) { $return[$k] = static::delete($array, $k); } return $return; } $key_parts = explode('.', $key); if (! is_array($array) or ! array_k...
php
public static function delete(&$array, $key) { if (is_null($key)) { return false; } if (is_array($key)) { $return = array(); foreach ($key as $k) { $return[$k] = static::delete($array, $k); } return $return; } $key_parts = explode('.', $key); if (! is_array($array) or ! array_k...
[ "public", "static", "function", "delete", "(", "&", "$", "array", ",", "$", "key", ")", "{", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "return", "false", ";", "}", "if", "(", "is_array", "(", "$", "key", ")", ")", "{", "$", "return"...
Unsets dot-notated key from an array @param array $array The search array @param mixed $key The dot-notated key or array of keys @return mixed @since 2.0
[ "Unsets", "dot", "-", "notated", "key", "from", "an", "array" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L198-L235
229,582
fuelphp/common
src/Arr.php
Arr.assocToKeyval
public static function assocToKeyval($assoc, $key_field, $val_field) { if (! is_array($assoc) and ! $assoc instanceof \Iterator) { throw new \InvalidArgumentException('The first parameter must be an array.'); } $output = array(); foreach ($assoc as $row) { if (isset($row[$key_field]) and isset($row[...
php
public static function assocToKeyval($assoc, $key_field, $val_field) { if (! is_array($assoc) and ! $assoc instanceof \Iterator) { throw new \InvalidArgumentException('The first parameter must be an array.'); } $output = array(); foreach ($assoc as $row) { if (isset($row[$key_field]) and isset($row[...
[ "public", "static", "function", "assocToKeyval", "(", "$", "assoc", ",", "$", "key_field", ",", "$", "val_field", ")", "{", "if", "(", "!", "is_array", "(", "$", "assoc", ")", "and", "!", "$", "assoc", "instanceof", "\\", "Iterator", ")", "{", "throw",...
Converts a multi-dimensional associative array into an array of key => values with the provided field names @param array $assoc the array to convert @param string $key_field the field name of the key field @param string $val_field the field name of the value field @return array @throws \InvalidArgumentEx...
[ "Converts", "a", "multi", "-", "dimensional", "associative", "array", "into", "an", "array", "of", "key", "=", ">", "values", "with", "the", "provided", "field", "names" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L248-L265
229,583
fuelphp/common
src/Arr.php
Arr.toAssoc
public static function toAssoc($arr) { if (($count = count($arr)) % 2 > 0) { throw new \BadMethodCallException('Number of values in to_assoc must be even.'); } $keys = $vals = array(); for ($i = 0; $i < $count - 1; $i += 2) { $keys[] = array_shift($arr); $vals[] = array_shift($arr); } return ...
php
public static function toAssoc($arr) { if (($count = count($arr)) % 2 > 0) { throw new \BadMethodCallException('Number of values in to_assoc must be even.'); } $keys = $vals = array(); for ($i = 0; $i < $count - 1; $i += 2) { $keys[] = array_shift($arr); $vals[] = array_shift($arr); } return ...
[ "public", "static", "function", "toAssoc", "(", "$", "arr", ")", "{", "if", "(", "(", "$", "count", "=", "count", "(", "$", "arr", ")", ")", "%", "2", ">", "0", ")", "{", "throw", "new", "\\", "BadMethodCallException", "(", "'Number of values in to_ass...
Converts the given 1 dimensional non-associative array to an associative array. The array given must have an even number of elements or null will be returned. Arr::to_assoc(array('foo','bar')); @param string $arr the array to change @return array|null the new array or null @throws \BadMethodCallException @sinc...
[ "Converts", "the", "given", "1", "dimensional", "non", "-", "associative", "array", "to", "an", "associative", "array", "." ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L281-L295
229,584
fuelphp/common
src/Arr.php
Arr.prepend
public static function prepend(&$arr, $key, $value = null) { $arr = (is_array($key) ? $key : array($key => $value)) + $arr; }
php
public static function prepend(&$arr, $key, $value = null) { $arr = (is_array($key) ? $key : array($key => $value)) + $arr; }
[ "public", "static", "function", "prepend", "(", "&", "$", "arr", ",", "$", "key", ",", "$", "value", "=", "null", ")", "{", "$", "arr", "=", "(", "is_array", "(", "$", "key", ")", "?", "$", "key", ":", "array", "(", "$", "key", "=>", "$", "va...
Prepends a value with an asociative key to an array. Will overwrite if the value exists. @param array &$arr the array to prepend to @param string|array $key the key or array of keys and values @param mixed $value the value to prepend @since 2.0
[ "Prepends", "a", "value", "with", "an", "asociative", "key", "to", "an", "array", ".", "Will", "overwrite", "if", "the", "value", "exists", "." ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L982-L985
229,585
fuelphp/common
src/Arr.php
Arr.unique
public static function unique($arr) { // filter out all duplicate values return array_filter( $arr, function ($item) { // contrary to popular belief, this is not as static as you think... static $vars = array(); if (in_array($item, $vars, true)) { // duplicate return false; ...
php
public static function unique($arr) { // filter out all duplicate values return array_filter( $arr, function ($item) { // contrary to popular belief, this is not as static as you think... static $vars = array(); if (in_array($item, $vars, true)) { // duplicate return false; ...
[ "public", "static", "function", "unique", "(", "$", "arr", ")", "{", "// filter out all duplicate values", "return", "array_filter", "(", "$", "arr", ",", "function", "(", "$", "item", ")", "{", "// contrary to popular belief, this is not as static as you think...", "st...
Returns only unique values in an array. It does not sort. First value is used. @param array $arr the array to dedup @return array array with only de-duped values @since 2.0
[ "Returns", "only", "unique", "values", "in", "an", "array", ".", "It", "does", "not", "sort", ".", "First", "value", "is", "used", "." ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L1099-L1124
229,586
fuelphp/common
src/Arr.php
Arr.nextByKey
public static function nextByKey($array, $key, $getValue = false, $strict = false) { if (! is_array($array) and ! $array instanceof \ArrayAccess) { throw new \InvalidArgumentException('First parameter must be an array or ArrayAccess object.'); } // get the keys of the array $keys = array_keys($array); ...
php
public static function nextByKey($array, $key, $getValue = false, $strict = false) { if (! is_array($array) and ! $array instanceof \ArrayAccess) { throw new \InvalidArgumentException('First parameter must be an array or ArrayAccess object.'); } // get the keys of the array $keys = array_keys($array); ...
[ "public", "static", "function", "nextByKey", "(", "$", "array", ",", "$", "key", ",", "$", "getValue", "=", "false", ",", "$", "strict", "=", "false", ")", "{", "if", "(", "!", "is_array", "(", "$", "array", ")", "and", "!", "$", "array", "instance...
Get the next value or key from an array using the current array key @param array $array the array containing the values @param string $key key of the current entry to use as reference @param bool $getValue if true, return the next value instead of the next key @param bool $strict if true, do...
[ "Get", "the", "next", "value", "or", "key", "from", "an", "array", "using", "the", "current", "array", "key" ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L1222-L1248
229,587
fuelphp/common
src/Arr.php
Arr.subset
public static function subset(array $array, array $keys, $default = null) { $result = array(); foreach ($keys as $key) { static::set($result, $key, static::get($array, $key, $default)); } return $result; }
php
public static function subset(array $array, array $keys, $default = null) { $result = array(); foreach ($keys as $key) { static::set($result, $key, static::get($array, $key, $default)); } return $result; }
[ "public", "static", "function", "subset", "(", "array", "$", "array", ",", "array", "$", "keys", ",", "$", "default", "=", "null", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", "sta...
Return the subset of the array defined by the supplied keys. Returns $default for missing keys, as with Arr::get() @param array $array the array containing the values @param array $keys list of keys (or indices) to return @param mixed $default value of missing keys; default null @return array An array c...
[ "Return", "the", "subset", "of", "the", "array", "defined", "by", "the", "supplied", "keys", "." ]
ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40
https://github.com/fuelphp/common/blob/ddb6b9ced050f1ae7b22326d9c8c32b0dabdbf40/src/Arr.php#L1344-L1354
229,588
rougin/spark-plug
src/SparkPlug.php
SparkPlug.instance
public function instance() { $this->paths(); $this->environment($this->constants['ENVIRONMENT']); $this->constants(); $this->common(); $this->config(); require 'helpers.php'; $instance = \CI_Controller::get_instance(); empty($instance) && $insta...
php
public function instance() { $this->paths(); $this->environment($this->constants['ENVIRONMENT']); $this->constants(); $this->common(); $this->config(); require 'helpers.php'; $instance = \CI_Controller::get_instance(); empty($instance) && $insta...
[ "public", "function", "instance", "(", ")", "{", "$", "this", "->", "paths", "(", ")", ";", "$", "this", "->", "environment", "(", "$", "this", "->", "constants", "[", "'ENVIRONMENT'", "]", ")", ";", "$", "this", "->", "constants", "(", ")", ";", "...
Returns the Codeigniter singleton. @return \CI_Controller
[ "Returns", "the", "Codeigniter", "singleton", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L75-L94
229,589
rougin/spark-plug
src/SparkPlug.php
SparkPlug.set
public function set($key, $value) { $this->constants[$key] = $value; $same = $key === 'APPPATH'; $path = $this->constants[$key] . '/views/'; $same && $this->constants['VIEWPATH'] = $path; return $this; }
php
public function set($key, $value) { $this->constants[$key] = $value; $same = $key === 'APPPATH'; $path = $this->constants[$key] . '/views/'; $same && $this->constants['VIEWPATH'] = $path; return $this; }
[ "public", "function", "set", "(", "$", "key", ",", "$", "value", ")", "{", "$", "this", "->", "constants", "[", "$", "key", "]", "=", "$", "value", ";", "$", "same", "=", "$", "key", "===", "'APPPATH'", ";", "$", "path", "=", "$", "this", "->",...
Sets the constant with a value. @param string $key @param string $value
[ "Sets", "the", "constant", "with", "a", "value", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L102-L113
229,590
rougin/spark-plug
src/SparkPlug.php
SparkPlug.basepath
protected function basepath() { $directory = new \RecursiveDirectoryIterator(getcwd()); $iterator = new \RecursiveIteratorIterator($directory); foreach ($iterator as $item) { $core = 'core' . DIRECTORY_SEPARATOR . 'CodeIgniter.php'; $exists = strpos($item->getPathn...
php
protected function basepath() { $directory = new \RecursiveDirectoryIterator(getcwd()); $iterator = new \RecursiveIteratorIterator($directory); foreach ($iterator as $item) { $core = 'core' . DIRECTORY_SEPARATOR . 'CodeIgniter.php'; $exists = strpos($item->getPathn...
[ "protected", "function", "basepath", "(", ")", "{", "$", "directory", "=", "new", "\\", "RecursiveDirectoryIterator", "(", "getcwd", "(", ")", ")", ";", "$", "iterator", "=", "new", "\\", "RecursiveIteratorIterator", "(", "$", "directory", ")", ";", "foreach...
Sets the base path. @return void
[ "Sets", "the", "base", "path", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L120-L135
229,591
rougin/spark-plug
src/SparkPlug.php
SparkPlug.charset
protected function charset() { ini_set('default_charset', $charset = strtoupper(config_item('charset'))); defined('MB_ENABLED') || define('MB_ENABLED', extension_loaded('mbstring')); $encoding = 'mbstring.internal_encoding'; ! is_php('5.6') && ! ini_get($encoding) && ini_set($enco...
php
protected function charset() { ini_set('default_charset', $charset = strtoupper(config_item('charset'))); defined('MB_ENABLED') || define('MB_ENABLED', extension_loaded('mbstring')); $encoding = 'mbstring.internal_encoding'; ! is_php('5.6') && ! ini_get($encoding) && ini_set($enco...
[ "protected", "function", "charset", "(", ")", "{", "ini_set", "(", "'default_charset'", ",", "$", "charset", "=", "strtoupper", "(", "config_item", "(", "'charset'", ")", ")", ")", ";", "defined", "(", "'MB_ENABLED'", ")", "||", "define", "(", "'MB_ENABLED'"...
Sets up important charset-related stuff. @return void
[ "Sets", "up", "important", "charset", "-", "related", "stuff", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L142-L153
229,592
rougin/spark-plug
src/SparkPlug.php
SparkPlug.config
protected function config() { $this->globals['CFG'] =& load_class('Config', 'core'); $this->globals['UNI'] =& load_class('Utf8', 'core'); $this->globals['SEC'] =& load_class('Security', 'core'); $this->core(); }
php
protected function config() { $this->globals['CFG'] =& load_class('Config', 'core'); $this->globals['UNI'] =& load_class('Utf8', 'core'); $this->globals['SEC'] =& load_class('Security', 'core'); $this->core(); }
[ "protected", "function", "config", "(", ")", "{", "$", "this", "->", "globals", "[", "'CFG'", "]", "=", "&", "load_class", "(", "'Config'", ",", "'core'", ")", ";", "$", "this", "->", "globals", "[", "'UNI'", "]", "=", "&", "load_class", "(", "'Utf8'...
Sets global configurations. @return void
[ "Sets", "global", "configurations", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L176-L185
229,593
rougin/spark-plug
src/SparkPlug.php
SparkPlug.constants
protected function constants() { $config = APPPATH . 'config/'; $constants = $config . ENVIRONMENT . '/constants.php'; $filename = $config . 'constants.php'; file_exists($constants) && $filename = $constants; defined('FILE_READ_MODE') || require $filename; }
php
protected function constants() { $config = APPPATH . 'config/'; $constants = $config . ENVIRONMENT . '/constants.php'; $filename = $config . 'constants.php'; file_exists($constants) && $filename = $constants; defined('FILE_READ_MODE') || require $filename; }
[ "protected", "function", "constants", "(", ")", "{", "$", "config", "=", "APPPATH", ".", "'config/'", ";", "$", "constants", "=", "$", "config", ".", "ENVIRONMENT", ".", "'/constants.php'", ";", "$", "filename", "=", "$", "config", ".", "'constants.php'", ...
Loads the framework constants. @return void
[ "Loads", "the", "framework", "constants", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L192-L203
229,594
rougin/spark-plug
src/SparkPlug.php
SparkPlug.environment
protected function environment($value = 'development') { isset($this->server['CI_ENV']) && $value = $this->server['CI_ENV']; defined('ENVIRONMENT') || define('ENVIRONMENT', $value); }
php
protected function environment($value = 'development') { isset($this->server['CI_ENV']) && $value = $this->server['CI_ENV']; defined('ENVIRONMENT') || define('ENVIRONMENT', $value); }
[ "protected", "function", "environment", "(", "$", "value", "=", "'development'", ")", "{", "isset", "(", "$", "this", "->", "server", "[", "'CI_ENV'", "]", ")", "&&", "$", "value", "=", "$", "this", "->", "server", "[", "'CI_ENV'", "]", ";", "defined",...
Sets up the current environment. @return void
[ "Sets", "up", "the", "current", "environment", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L228-L233
229,595
rougin/spark-plug
src/SparkPlug.php
SparkPlug.paths
protected function paths() { $paths = array('APPPATH' => $this->constants['APPPATH']); $paths['VENDOR'] = $this->constants['VENDOR']; $paths['VIEWPATH'] = $this->constants['VIEWPATH']; foreach ((array) $paths as $key => $value) { $defined = defined($key); ...
php
protected function paths() { $paths = array('APPPATH' => $this->constants['APPPATH']); $paths['VENDOR'] = $this->constants['VENDOR']; $paths['VIEWPATH'] = $this->constants['VIEWPATH']; foreach ((array) $paths as $key => $value) { $defined = defined($key); ...
[ "protected", "function", "paths", "(", ")", "{", "$", "paths", "=", "array", "(", "'APPPATH'", "=>", "$", "this", "->", "constants", "[", "'APPPATH'", "]", ")", ";", "$", "paths", "[", "'VENDOR'", "]", "=", "$", "this", "->", "constants", "[", "'VEND...
Sets up the APPPATH, VENDOR, and BASEPATH constants. @return void
[ "Sets", "up", "the", "APPPATH", "VENDOR", "and", "BASEPATH", "constants", "." ]
a9189c80ddcbafb3b21ea3b491b664c8e860c584
https://github.com/rougin/spark-plug/blob/a9189c80ddcbafb3b21ea3b491b664c8e860c584/src/SparkPlug.php#L253-L268
229,596
alex-phillips/clouddrive-php
src/CloudDrive/Node.php
Node.download
public function download($dest, $callback = null) { if ($this->isFolder()) { return $this->downloadFolder($dest, $callback); } return $this->downloadFile($dest, $callback); }
php
public function download($dest, $callback = null) { if ($this->isFolder()) { return $this->downloadFolder($dest, $callback); } return $this->downloadFile($dest, $callback); }
[ "public", "function", "download", "(", "$", "dest", ",", "$", "callback", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isFolder", "(", ")", ")", "{", "return", "$", "this", "->", "downloadFolder", "(", "$", "dest", ",", "$", "callback", ")...
Download contents of `Node` to local save path. If only the local directory is given, the file will be saved as its remote name. @param resource|string $dest @param callable $callback @return array @throws \Exception
[ "Download", "contents", "of", "Node", "to", "local", "save", "path", ".", "If", "only", "the", "local", "directory", "is", "given", "the", "file", "will", "be", "saved", "as", "its", "remote", "name", "." ]
f369d0567c55ee1c7650246ce6938815fbddc5bf
https://github.com/alex-phillips/clouddrive-php/blob/f369d0567c55ee1c7650246ce6938815fbddc5bf/src/CloudDrive/Node.php#L93-L100
229,597
alex-phillips/clouddrive-php
src/CloudDrive/Node.php
Node.downloadFile
protected function downloadFile($dest, $callback = null) { $retval = [ 'success' => false, 'data' => [], ]; if (is_resource($dest)) { $handle = $dest; $metadata = stream_get_meta_data($handle); $dest = $metadata["uri"]; ...
php
protected function downloadFile($dest, $callback = null) { $retval = [ 'success' => false, 'data' => [], ]; if (is_resource($dest)) { $handle = $dest; $metadata = stream_get_meta_data($handle); $dest = $metadata["uri"]; ...
[ "protected", "function", "downloadFile", "(", "$", "dest", ",", "$", "callback", "=", "null", ")", "{", "$", "retval", "=", "[", "'success'", "=>", "false", ",", "'data'", "=>", "[", "]", ",", "]", ";", "if", "(", "is_resource", "(", "$", "dest", "...
Save a FILE node to the specified local destination. @param resource|string $dest @param callable $callback @return array @throws \Exception
[ "Save", "a", "FILE", "node", "to", "the", "specified", "local", "destination", "." ]
f369d0567c55ee1c7650246ce6938815fbddc5bf
https://github.com/alex-phillips/clouddrive-php/blob/f369d0567c55ee1c7650246ce6938815fbddc5bf/src/CloudDrive/Node.php#L111-L180
229,598
alex-phillips/clouddrive-php
src/CloudDrive/Node.php
Node.downloadFolder
protected function downloadFolder($dest, $callback = null) { $retval = [ 'success' => false, 'data' => [], ]; if (!is_string($dest)) { throw new \Exception("Must pass in local path to download directory to."); } $nodes = $this->getChil...
php
protected function downloadFolder($dest, $callback = null) { $retval = [ 'success' => false, 'data' => [], ]; if (!is_string($dest)) { throw new \Exception("Must pass in local path to download directory to."); } $nodes = $this->getChil...
[ "protected", "function", "downloadFolder", "(", "$", "dest", ",", "$", "callback", "=", "null", ")", "{", "$", "retval", "=", "[", "'success'", "=>", "false", ",", "'data'", "=>", "[", "]", ",", "]", ";", "if", "(", "!", "is_string", "(", "$", "des...
Recursively download all children of a FOLDER node to the specified local destination. @param string $dest @param callable $callback @return array @throws \Exception
[ "Recursively", "download", "all", "children", "of", "a", "FOLDER", "node", "to", "the", "specified", "local", "destination", "." ]
f369d0567c55ee1c7650246ce6938815fbddc5bf
https://github.com/alex-phillips/clouddrive-php/blob/f369d0567c55ee1c7650246ce6938815fbddc5bf/src/CloudDrive/Node.php#L192-L221
229,599
alex-phillips/clouddrive-php
src/CloudDrive/Node.php
Node.getMetadata
public function getMetadata($tempLink = false) { $retval = [ 'success' => false, 'data' => [], ]; $query = []; if ($tempLink) { $query['tempLink'] = true; } $response = self::$httpClient->get( self::$account->getMe...
php
public function getMetadata($tempLink = false) { $retval = [ 'success' => false, 'data' => [], ]; $query = []; if ($tempLink) { $query['tempLink'] = true; } $response = self::$httpClient->get( self::$account->getMe...
[ "public", "function", "getMetadata", "(", "$", "tempLink", "=", "false", ")", "{", "$", "retval", "=", "[", "'success'", "=>", "false", ",", "'data'", "=>", "[", "]", ",", "]", ";", "$", "query", "=", "[", "]", ";", "if", "(", "$", "tempLink", ")...
Retrieve the node's metadata directly from the API. @param bool|false $tempLink @return array
[ "Retrieve", "the", "node", "s", "metadata", "directly", "from", "the", "API", "." ]
f369d0567c55ee1c7650246ce6938815fbddc5bf
https://github.com/alex-phillips/clouddrive-php/blob/f369d0567c55ee1c7650246ce6938815fbddc5bf/src/CloudDrive/Node.php#L262-L295