[Beeframework-svn] SF.net SVN: beeframework:[155] trunk/framework/Bee
Brought to you by:
b_hartmann,
m_plomer
|
From: <m_p...@us...> - 2014-06-24 18:21:21
|
Revision: 155
http://sourceforge.net/p/beeframework/code/155
Author: m_plomer
Date: 2014-06-24 18:21:20 +0000 (Tue, 24 Jun 2014)
Log Message:
-----------
misc changes
Modified Paths:
--------------
trunk/framework/Bee/Filesystem/MimeDetector.php
trunk/framework/Bee/Persistence/Pdo/SimpleDaoBase.php
Modified: trunk/framework/Bee/Filesystem/MimeDetector.php
===================================================================
--- trunk/framework/Bee/Filesystem/MimeDetector.php 2014-06-18 13:10:26 UTC (rev 154)
+++ trunk/framework/Bee/Filesystem/MimeDetector.php 2014-06-24 18:21:20 UTC (rev 155)
@@ -20,10 +20,6 @@
private static $types;
- private static function parseMimeTypeFile() {
-
- }
-
/**
* Enter description here...
*
@@ -31,6 +27,12 @@
* @return String
*/
public static function detect($filename) {
+ // todo:
+// $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
+// foreach (glob("*") as $filename) {
+// echo finfo_file($finfo, $filename) . "\n";
+// }
+// finfo_close($finfo);
if(is_null(self::$types)) {
self::$types = Bee_Cache_Manager::retrieveCachable(new Bee_Filesystem_MimedictionaryCacheable());
}
@@ -82,4 +84,3 @@
return $result;
}
}
-?>
\ No newline at end of file
Modified: trunk/framework/Bee/Persistence/Pdo/SimpleDaoBase.php
===================================================================
--- trunk/framework/Bee/Persistence/Pdo/SimpleDaoBase.php 2014-06-18 13:10:26 UTC (rev 154)
+++ trunk/framework/Bee/Persistence/Pdo/SimpleDaoBase.php 2014-06-24 18:21:20 UTC (rev 155)
@@ -16,6 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+use PDO;
/**
* User: mp
@@ -41,23 +42,35 @@
}
/**
- * @var \PDO
+ * @var PDO
*/
private $pdoConnection;
- public function __construct(\PDO $pdoConnection) {
- self::getLog()->info('DAO constructed, got PDO connection');
- $this->pdoConnection = $pdoConnection;
+ /**
+ * @param PDO $pdoConnection
+ */
+ public function __construct(PDO $pdoConnection = null) {
+ if(!is_null($pdoConnection)) {
+ self::getLog()->info('DAO constructed, got PDO connection');
+ $this->pdoConnection = $pdoConnection;
+ }
}
/**
- * @return \PDO
+ * @return PDO
*/
public function getPdoConnection() {
return $this->pdoConnection;
}
/**
+ * @param PDO $pdoConnection
+ */
+ public function setPdoConnection(PDO $pdoConnection) {
+ $this->pdoConnection = $pdoConnection;
+ }
+
+ /**
* @param callback $func
* @throws \Exception
* @return mixed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|