public function __construct($bucket, $object, $context, $flags) { parent::__construct($bucket, $object, $context); $this->quiet = ($flags & STREAM_URL_STAT_QUIET) == STREAM_URL_STAT_QUIET; if (isset($object)) { // Drop the leading '/' from the object name. $this->prefix = substr($object, 1); } }
public function __construct($bucket_name, $object_prefix, $context) { parent::__construct($bucket_name, $object_prefix, $context); // Ignore the leading slash if (isset($object_prefix)) { if (!util\endsWith($object_prefix, '/')) { $object_prefix .= '/'; } $this->prefix = substr($object_prefix, 1); } }
/** * Class constructor. * @param string $bucket_name The name of the bucket. * @param string $object_name The name of the object. * @param mixed $context The stream context for this operation. */ public function __construct($bucket_name, $object_name, $context) { // $object_name should end with a trailing slash. if (!StringUtil::endsWith($object_name, parent::DELIMITER)) { $object_name = $object_name . parent::DELIMITER; } // $prefix is the $object_name without leading slash. if (strlen($object_name) > 1) { $this->prefix = substr($object_name, 1); } parent::__construct($bucket_name, $object_name, $context); }
public function __construct($bucket, $object, $context) { parent::__construct($bucket, $object, $context); $this->memcache_client = new \Memcache(); }